问题
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