-
Notifications
You must be signed in to change notification settings - Fork 520
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
Add cache layer support #22
Comments
Play is a good role model: Memcached configuration~~~~~Enable memcached if needed. Otherwise a local cache is used.memcached=enabledSpecify memcached host (default to 127.0.0.1:11211)memcached.host=127.0.0.1:11211Or you can specify multiple host to build a distributed cachememcached.1.host=127.0.0.1:11211memcached.2.host=127.0.0.1:11212 |
i suggest to use guava cache for local cache is already done and perfect, and later, i will impl hazelcast and\or memcache storage for distributed cache. probably need to create some NinjaCacheManager class |
Hi zoza, I would closely model it after an interface from Play 1: Then we can use different Cache Implementations under the hood. The guava cache is for sure a pretty good idea if the cache should live on one machine. In other cases EhCache might be useful... But a must is memcached - especially when scaling up the instances... Cheers, Raphael |
Play cache is very simple delegate interface. For low level usage it's
|
Also please look at hazelcast
|
i started to implement |
On Wed, Mar 13, 2013 at 4:37 PM, Anatoly notifications@github.com wrote:
cool :) please post really early and really often so we can discuss stuff... I'd really love to see:
Binding the interface with the implementation is of course done simply via Cheers! Raphael |
as a concept it will be as play 1 cache. i want to create 1 maven project (jar at the end): cache-manager with
On Wed, Mar 13, 2013 at 10:41 PM, reyez notifications@github.com wrote:
|
On Wed, Mar 13, 2013 at 11:03 PM, Anatoly notifications@github.com wrote:
sounds perfect :) cheers, raphael |
Once that is up and running it should be really simple to cache the response of a controller method via a filter like: :) |
no, its not.. :) On Thu, Mar 14, 2013 at 10:47 AM, reyez notifications@github.com wrote:
|
first commit: |
On Thu, Mar 14, 2013 at 11:55 AM, Anatoly notifications@github.com wrote:
looks good to me :) |
im just now comited some code On Thu, Mar 14, 2013 at 6:48 PM, reyez notifications@github.com wrote:
|
few questions: also about exceptions: |
On Sun, Mar 17, 2013 at 3:32 PM, Anatoly notifications@github.com wrote:
Hi Anatoly, I did not use the increment decrement functionality myself. I would just Regarding exceptions => I'd also mimic the behavior of Play. The good thing Cheers, Raphael |
im comited some code |
On Fri, Mar 29, 2013 at 4:00 PM, Anatoly notifications@github.com wrote:
Hi zoza, I'll have a look next week. Sorry, I am a bit busy right now :( Thanks! Raphael
inc: http://ars-machina.raphaelbauer.com |
Just my quick remarks. I really like what I see - (testcases hooray!) Good Best, Raphael |
|
Hi zoza, If you want to independently use the lib you should put it under your own namespace and upload it to the maven repo. We can then use that for ninja. Ninja ideally would only use simple interfaces (ninja.cache or so) that are then bound to your cache manager. We can also integrate that into Ninja like what you proposed with ninja-servlet. We could also host it as external library (something like https://github.com/reyez/ninja-ebean). To sum it up: Just fork Ninja and integrate it the way you want :) We can discuss stuff then :) Best, Raphael |
cache layer now integrated via ehcache and memcached |
One for jcache and one for memchached. Should be straight forward. Good examples are Play 1's classes.
The text was updated successfully, but these errors were encountered: