Question

I am working on a project on Google AppEngine, where I am using the datastore and memcache. For testing purposes, I go to the control panel, change and save of some values of some saved entities in the datastore. However, since they're already in memcache, I assume, the changes don't reflect on the application. Using Admin/control panel, is there a way to enforce reloading these entities into memcache from the datastore, or at least to clear memcache?

Thank you, Hazem

Était-ce utile?

La solution

With the release of SDK 1.6.4 today a memcache page has been added to the production admin dashboard. It has a button that lets you flush memcache (as well as other features).

That does not solve the problem of automatically managing the memcache version of your entities. For that you could look into the NDB library (new standard library in SDK 1.6.4) which automatically caches your entities as you use them and invalidates the cache as necessary. It has lots of other features as well. I have not used it yet but it certainly sounds good: http://code.google.com/appengine/docs/python/ndb/

UPDATED March 27 now that SDK 1.6.4 has gone final and I can confirm it contains the memcache control panel.

Autres conseils

As an alternative: I believe you could use Remote API, fire up a shell and execute e.g. memcache.flush_all()

no there isnt. make a handler that does that for you and when you need to flush memcache you can simply hit that url

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top