python appengine memcache optimization

271 views Asked by At

I am developing an api on google appengine django nonrel that will serve a lot of requests. I would like to cache repeated requests. It is estimated that there will be some really frequent queries to the api, and I would like to be able to find out what these queries are on the fly so that I may pre-cache them. Is there a way of getting the most frequent memcache keys?

2

There are 2 answers

1
Daniel Roseman On

Presuming you mean "the most frequent datastore queries", appstats is probably what you need.

0
Nick Johnson On

Cache everything that might be frequent, and let Memcache's LRU policy evict items that aren't accessed frequently enough to warrant remaining in the cache.