tags:

views:

35

answers:

1

can I store objects in the servers memory to cache data using django, or do I have to use memcache for that?

+3  A: 

There are a variety of options, including using the server's memory:

  • Memcached
  • Database caching
  • Filesystem caching
  • Local-memory caching
  • Dummy caching (for development)
  • Using a custom cache backend

To use the server's memory, in settings.py, you should set the cache backend as follows:

CACHE_BACKEND = 'locmem://'

See the following page in the Django documentation for further information on the various cache backends and for details on how to enable caching: http://docs.djangoproject.com/en/dev/topics/cache/

msanders