Google App Engine 上的 Django-nonrel ≤1.3 和 Memcache
我是一名设计师,仍在尝试在 Google App Engine 中编写我的第一个应用程序作为实验。
我已经达到了我想要设置 memcache 来缓存我的整个站点的程度,按照以下说明进行操作: http://docs.djangoproject.com/en/dev/topics/cache/#memcached
我很清楚,我需要在我的settings.py中添加以下内容:
CACHE_BACKEND = 'memcached://[IP ADDRESS]:[PORT]/'
然后:
MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', ) CACHE_MIDDLEWARE_SECONDS=60*2
这可能这是一个非常愚蠢的问题,但是我的 Google 应用程序引擎网站的 IP 地址和端口是什么?由于它由 Google 托管,我需要考虑什么吗?
我怎样才能找到它
I'm a designer still trying to code up my first app in Google App Engine as an experiment.
I have got to the point where I want to set up memcache to cache my entire site following the instructions at: http://docs.djangoproject.com/en/dev/topics/cache/#memcached
I am clear that I need to add in my settings.py the following:
CACHE_BACKEND = 'memcached://[IP ADDRESS]:[PORT]/'
And then:
MIDDLEWARE_CLASSES = ( 'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', ) CACHE_MIDDLEWARE_SECONDS=60*2
This might be a really dumb question but what would my IP address and port be for my google app engine site? Is there any considerations I need to make because of the fact that it is being hosted at Google?
How would I find it out
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
djangoappengine 有标准设置。在 settings.py 的顶部,您应该有“from djangoappengine.settings_base import *”。您可以查看 settings_base 模块以查看所有后端和默认设置。
djangoappengine has standard settings. At the top of your settings.py you should have "from djangoappengine.settings_base import *". You can take a look at the settings_base module to see all backends and default settings.
尝试:
CACHE_BACKEND = 'memcached://?timeout=0'
。来源: http://bitbucket.org/wkornewald/djangoappengine/src/tip/settings_base .py
Try:
CACHE_BACKEND = 'memcached://?timeout=0'
.Source: http://bitbucket.org/wkornewald/djangoappengine/src/tip/settings_base.py