3

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

Hazem Mahsoub
  • 128
  • 1
  • 10
  • possible duplicate of [How can I have Google App Engine clear memcache every time a site is deployed?](http://stackoverflow.com/questions/1983556/how-can-i-have-google-app-engine-clear-memcache-every-time-a-site-is-deployed) – mechanical_meat Mar 22 '12 at 16:33
  • Above question/answers do not address doing this from Control Panel, but I think they provide an adequate solution. – mechanical_meat Mar 22 '12 at 16:34

3 Answers3

6

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.

Bryce Cutt
  • 1,525
  • 10
  • 20
6

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

alex
  • 2,450
  • 16
  • 22
0

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

aschmid00
  • 7,038
  • 2
  • 47
  • 66