How to configure Memcache for Django on Google cloud AppEngine?

混江龙づ霸主 提交于 2021-02-07 08:16:56

问题


In my settings i have:

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        'LOCATION': '127.0.0.1:11211',
    }
}

and i have installed https://pypi.org/project/python-memcached/

Anything else needed?


回答1:


The way to enable Memcache for Django on GCP depends on which product you are using (App Engine, Compute Engine, Kubernetes Engine) [1]

Since you are using App Engine, it is built-in. You can find examples on how to use Memcache with GCP here. [2]

[1] How to install Memcache on GCP for Django: https://cloud.google.com/python/django/#caches

[2]Memcache examples on GCP Docs: https://cloud.google.com/appengine/docs/standard/python/memcache/examples?hl=en



来源:https://stackoverflow.com/questions/53252959/how-to-configure-memcache-for-django-on-google-cloud-appengine

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