GAE: memcache: is it the same across multiple app instances

試著忘記壹切 提交于 2019-12-07 02:50:18

问题


I have a pretty basic question: In GAE, if I use memcache to store some data once it was retrieved for the first time from the db, if then that data remains in the cache for like 2 days, do ALL instances of said application get to "see" it and retrieve it from cache? Or is the cache separate for each application instance?

I'm asking this because I've seen that due to the way that GAE spawns separate VM processes (not threads) for each new instance an application needs, stuff that used to be consistent across all instances (in the thread model) is now fragmented per instance (process): like the servelet application context which is NOT propagated across all instances of the same application.

So, again, is memcache consisten across multiple instances of the same application, or does it create per instance/process sets of cached data?


回答1:


It's consistent; GAE memcache runs as a service separate from your instances.



来源:https://stackoverflow.com/questions/8055381/gae-memcache-is-it-the-same-across-multiple-app-instances

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!