Forums

Install memcached in django

how can I install Memcached in Django? I did see the Documentations but could not find out how to install it. The Documentations says that I have to first install Memcached and then a Python Memcached binding ( pymemcache or Pylibmc), but could not find out how to install them.

memcached will not work on PythonAnywhere.

any other cache framework?

You can use the django cache framework with the filesystem backend. If you put your cache in /dev/shm that is an in-memory cache that will be pretty fast.

Ok.

Not related to Cache, Can i use celery on pythonanywhere?

No, that doesn't work on PythonAnywhere, either

You can use the django cache framework with the filesystem backend. If you put your cache in /dev/shm that is an in-memory cache that will be pretty fast.

did you mean by Filesystem cache like this?

CACHES = {
'default': {
    'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
    'LOCATION': '/var/tmp/django_cache',
 }
}

or Local-memory caching ?

Yes, that is what I meant.

Filesystem cache right!

Hi, how can i check if the cache is working or not?

Add prints to the view to see whether the view code is being skipped when you are using the cache. Prints to stderr will appear in your error log.