> Interacting with memcached is faster and cheaper than the datastore, but it > still costs something both in terms of performance and money. Is it > recommended to load commonly used data into the app scope (of every new > server that spins up) and use it from there rather than pulling it directly > from memcached on every request?
I don't know that we have enough experience yet to recommend a best practice. The trade-off will be application instance start-up time (for using the app scope) versus memcache accesses. If you know your application scope will be initialized with the same values every time, and those values don't change over the life of the application, and the initialization is relatively lightweight, then you might be better off using the application scope. Otherwise, memcache might be better. > If data in memcached changes, is there a > way to ensure that all the app scopes are synchronized with those changes? Nope. You'll need to figure out a way to manage this yourself--GAE does not provide any support for doing this. > Also, how permanent is memcached? Does it have to be rebuilt from the > datastore at times? Are there predictable events to watch out for? I've noticed that memcache values can remain for weeks. However, there's no guarantee at all regarding the longevity (or lack thereof) of memcache values. Also, memcache is *not* automatically backed by the datastore. Once evicted, memcache values are gone forever. No, there are no events to tell you when memcache values have been evicted or changed. Vince --~--~---------~--~----~------------~-------~--~----~ Open BlueDragon Public Mailing List http://groups.google.com/group/openbd?hl=en official site @ http://www.openbluedragon.org/ !! save a network - trim replies before posting !! -~----------~----~----~----~------~----~------~--~---
