play-gae
play-gae copied to clipboard
GAECache not working in combination with Scala plugin
When the GAE plugin is used in combination with the Scala plugin, Caching doesn't make use of the Memcache service of Google.
Do you have more info about this issue just to know a bit more about it at least?
Pascal
On Mon, Apr 9, 2012 at 9:45 PM, Kah Tang < [email protected]
wrote:
When the GAE plugin is used in combination with the Scala plugin, Caching doesn't make use of the Memcache service of Google.
Reply to this email directly or view it on GitHub: https://github.com/guillaumebort/play-gae/issues/46
I'm working on a Scala + GAE + Sienna combination in the Play framework. I have an object (Serializable) which I'm trying to cache with Cache.set(). When I run my App locally, it will put the object in memory. So far so good.
Before deploying it to GAE I'm changing the application.conf to production. When I make a call to the URL that will trigger the Cache.set(), I would expect the cached object to be put into the Memcache of GAE. But when I opened the Memcache viewer it didn't show any cache hits (or misses).
On Tue, Apr 10, 2012 at 8:19 AM, Kah Tang < [email protected]
wrote:
I'm working on a Scala + GAE + Sienna combination in the Play framework. I have an object (Serializable) which I'm trying to cache with Cache.set(). When I run my App locally, it will put the object in memory. So far so good.
Before deploying it to GAE I'm changing the application.conf to production. When I make a call to the URL that will trigger the Cache.set(), I would expect the cached object to be put into the Memcache of GAE. But when I opened the Memcache viewer it didn't show any cache hits (or misses).
You don't have to change the application.conf to production with play-gae, it's changed by the plugin itself afaik. Is the data not present in the cache at all or just not viewable in the memcache viewer? Can you validate that just after putting the data in the cache, you can get it (or not) in GAE env?
thanks Pascal
Reply to this email directly or view it on GitHub: https://github.com/guillaumebort/play-gae/issues/46#issuecomment-5039805
The data is retrieved in some way from the cache, but I have the feeling the cache is not wired to the Memcache API and instead just puts the cached object in Java's heap space.
I took a peek in the plugin's source and see a new GAECache object is set to the Cache.forcedImpl variable in the GAEplugin code. What I think is missing is the Cache.init() call, which is needed to make the Cache set the cacheImpl to the forcedImpl's variable. (You can see this happening in Play's Cache class).
This code of GAE plugin is quite old now and I know it was working in the past. So maybe something has changed in GAE SDK... Can you investigate a bit to see if it can solve the pb?
On Tue, Apr 10, 2012 at 8:58 AM, Kah Tang < [email protected]
wrote:
The data is retrieved in some way from the cache, but I have the feeling the cache is not wired to the Memcache API and instead just puts the cached object in Java's heap space.
I took a peek in the plugin's source and see a new GAECache object is set to the Cache.forcedImpl variable in the GAEplugin code. What I think is missing is the Cache.init() call, which is needed to make the Cache set the cacheImpl to the forcedImpl's variable. (You can see this happening in Play's Cache class).
Reply to this email directly or view it on GitHub: https://github.com/guillaumebort/play-gae/issues/46#issuecomment-5040193
I think I can make a fix for it. I'll fork the code and send you a pull request.
I'm seeing this issue even without using the Scala plugin. Once deployed to GAE, forcedCacheImpl
value is set but to GAECache
but cacheImpl
points to EhCacheImpl
.