-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Masai #4
base: master
Are you sure you want to change the base?
Masai #4
Conversation
Nice work! It looks good to me. Do you want to merge it in Saul or shall I? On a side note... With stores like these we should make it clear in the README that this cache is not blocking. Meaning, no locks are put in place which prevent mutliple threads or processes from computing the same value mutiple times simultaneously. For simple KV stores like this in the past I've created a lock key based on the original key and it tends to work reasonably well. If we do want to add support for this then we would want to modify the external cache mechanism in store and have each strategy provide a |
I got the go ahead from Sual to be more of a maintainer on this project, so I've merged this in. I plan on making the 0.4.0 release shortly. Thanks again for the patch! |
Hi again... I merged in the patch, but I think it still needs some work. When I tried to run the tests I got:
This isn't surprising since I don't have tokyo cabient installed, much less in my library path. I think this points out a problem though. Currently the masai subproject is requiring redis, tokyo, and db by default: A project that wants to use the masai caching plugin shouldn't have to have all of these unrelated dependencies. Could you make the patch lazily load the appropriate masai namespace based on what is selected by the strategy? (i.e. Move the Also, making |
The db require is a necessity. It's just the Masai protocol definition. However, you're right about where the requires should be and such. Not sure why I didn't do that in the first place. I'll have that done for you by the end of the day. :) |
Cool! BTW, I decided to change the name of the project to |
One more thing... I wasn't able to run the tests but it looks like you may have a bug here: https://github.com/Raynes/cache-dot-clj/blob/masai/masai/src/cache_dot_clj/masai.clj#L40 Shouldn't |
Nice catch. Don't know how it worked with that broken, but it did. :o I'll make all my changes off of your clj-cache repo and fix this as well. :) |
I added a Masai external caching algorithm. This gives cache-dot-clj the ability to cache to Redis and Tokyo Cabinet.
I used the ehcache implementation as my base for this. I'm also using all of its non-ehcache-specific tests, and they all pass.
If anything appears out of the ordinary, let me know and I'll fix 'er up! I think this is how it is supposed to work, but I could always be wrong. The fact that the tests pass is probably a good sign though. ;)