使用model cache给你的GAE应用程序加速
Wednesday, June. 10. 2009 –
Category: GAE 开发 –
2 Comments
Tags:
memcache
datastore
topStory
使用model cache给你的GAE应用程序加速
刚刚看到gae group里面的一片文章,里面实现了一个利用memcache来进行model cache的方法。
使用非常简单,而且加速效果明显:-)在这里分享下:D
原文在这:google group讨论
http://appengine-cookbook.appspot.com/recipe/seamless-memcache-caching-of-all-entities/
使用很简单,在你的models.py 最上方
datastore_cache.DatastoreCachingShim.Install()
然后就可以享受memcache带来的急速体验了:-)
他的一些优点和限制:
. All entities will be cached in memcache as they pass through this api proxy. Your get requests will be served out of memcache if there is a hit. The cache is updated through:
- puts
- gets
- queries
Limitations:
- The cache is completely pessimistic in the case of transactions. In case of a request that is part of a transaction:
* gets are not served from the cache
* puts/deletes invalidate those entities from the cache when they commit
* puts/deletes do not change the cache if they rollback
- If your entity keys are larger than the size allowed for memcache keys the cache will fail
2 Response to “使用model cache给你的GAE应用程序加速”
Leave a Reply
Logo
About Me
-
A Computer Geek in Beijing, China. Focus on Web2.0 Technology: Google App Engine, Python, Django, Software Architecture, Agile, JAVA, J2EE, JavaScript, etc.
Coding for fun, Coding with passion :-) It's my life!
Most Popular Posts
- 1. GAE限制续 (2074)
- 2. Eclipse Google Plugin安装指南 (1931)
- 3. iHere Blog 1.0.2 安装配置 (1785)
- 4. iHere Blog 安装 简要配置 (1483)
- 5. 终于在做导入的时候遇到了GAE的瓶颈 (1201)
- 6. 新加Ajax效果Page flow (1075)
- 7. GAE上面的Unittest总结 (1070)
- 8. Web Python IDE Py I/O release! (1039)
- 9. 新东西 呵呵 JS3D (1016)
- 10. 转向了Appengine patch (1008)
Tags
-
App Engine
Appengine patch
Django
Google
Google App Engine
Google App Engine
Java
algorithm
api
app
appengine
autodiscovery
blog
cache
chat
cloud computing
cron jobs
datastore
demo
feature
fetion
fridge
gae
geo
google
google app engine
google docs
googlemaps
iHere Blog History
ide
ihere
inforsphere
install
java
jquery
map
mashup
memcache
metaweblog
new
nutch
open source
pageflow
plugin
projects
pyio
python
quota
release
released
rss
sdk
snap
sort
topStory
twitter
weblog api
杂记


5 months, 2 weeks ago IP:60.9.87...
很纳闷 该怎么进入后台呢?
5 months, 2 weeks ago IP:221.221...
用你的google 帐号登录后 进/admin/