Does the app automate frequent requests automatically?

I think I remember reading somewhere that the Google apps engine automatically caches the results of very frequent queries in memory so that they can be retrieved faster.

Is it correct?

If so, is there still a charge to read the data in these requests?


source to share

3 answers

If you are using Python and the new ndb API it has automatic object caching, so if you fetch entities by key it will be cached:

As the comments say, requests are not cached. The cached requests don't end up in the datastore, so you save it there.

If you are using Java or other APIs to access the data store, then no, no caching.

edited The bug related to receiving cached requests has been fixed.



I think the application engine is not caching anything for you. While it may be that, internally, it caches some stuff for a second of a second, I don't think you should rely on that.

I think you will be charged the normal number of reads for each object you read from each request.



No, it is not. However, depending on what framework you are using to access the datastore, memcache will be used. Are you developing in java or python? On the java side, Objectify will cache GETs automatically, but not requests. Be aware that there is a big performance and caching difference between get and requests in both python and java.

You don't pay to read the datastore for memcache hits.



All Articles