Google App Engine 上的 Django-nonrel ≤1.3 和 Memcache

发布于 2024-09-29 01:20:06 字数 735 浏览 12 评论 0原文

我是一名设计师,仍在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雄赳赳气昂昂 2024-10-06 01:20:06

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.

淡看悲欢离合 2024-10-06 01:20:06

尝试: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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文