vinit_ivar
vinit_ivar

Reputation: 640

Google App Engine automatically updating memcache

So here's the problem, I've created a database model. When I create the model, a = Model(args), and then perform a.put(), GAE seems to automatically update the memcache, because all the data seems up-to-date even without me hitting the database. Logging the number of elements in the cache works also shows the correct number of elements. But I'm not manually updating the cache. How do I prevent this? Cheers.

Upvotes: 0

Views: 112

Answers (1)

Paul Collingwood
Paul Collingwood

Reputation: 9116

You can set policy functions:

Automatic caching is convenient for most applications but maybe your application is unusual and you want to turn off automatic caching for some or all entities. You can control the behavior of the caches by setting policy functions.

Memcache Policy

That's for NDB. You don't say what language/DB you are using but I'm sure it's all similar.

Upvotes: 4

Related Questions