Skip to content
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

GAECache not working in combination with Scala plugin #46

Open
rainmaker2k opened this issue Apr 9, 2012 · 7 comments
Open

GAECache not working in combination with Scala plugin #46

rainmaker2k opened this issue Apr 9, 2012 · 7 comments

Comments

@rainmaker2k
Copy link

When the GAE plugin is used in combination with the Scala plugin, Caching doesn't make use of the Memcache service of Google.

@mandubian
Copy link
Collaborator

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:
#46

@rainmaker2k
Copy link
Author

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).

@mandubian
Copy link
Collaborator

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:
#46 (comment)

@rainmaker2k
Copy link
Author

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).

@mandubian
Copy link
Collaborator

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:
#46 (comment)

@rainmaker2k
Copy link
Author

I think I can make a fix for it. I'll fork the code and send you a pull request.

@mustpax
Copy link
Contributor

mustpax commented May 21, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants