Django-nonrel≤1.3和Google App Engine上的Memcache [英] Django-nonrel ≤1.3 and Memcache on Google App Engine

查看:122
本文介绍了Django-nonrel≤1.3和Google App Engine上的Memcache的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一位设计师,仍然试图在Google App Engine中将我的第一个应用编码为实验。

I'm a designer still trying to code up my first app in Google App Engine as an experiment.

我已经到了想要设置的位置请按照以下说明缓存我的整个站点: http:// docs。 djangoproject.com/en/dev/topics/cache/#memcached

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

我清楚我需要在settings.py中添加以下内容:

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

这可能是一个非常愚蠢的问题,但我的IP地址和端口对我的g oogle应用引擎网站?我有什么需要考虑的事实,因为它是在谷歌托管的事实?

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?

我如何找到它

推荐答案

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.

这篇关于Django-nonrel≤1.3和Google App Engine上的Memcache的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆