How change caching setting in django_cache_utils0.7 to cache the files in different directory other than C drive?

StackOverflow https://stackoverflow.com/questions/23268058

Question

I am using django-cache-utils 0.7 where I am not able to change the cache directory to a drive location other than the default location. Please can anyone tell me how to define custom location and set a size limit on the folder ?

CACHE_BACKEND = 'cache_utils.group_backend://localhost:11213/?timeout=600&max_entries=500'

When I try with path location instead of localhost it gives error.

Was it helpful?

Solution

cache_utils.group_backend is a cache backend that stores data in memcached. By itself it doesn't store it anywhere - on C drive or anywhere else. Memcached also doesn't keep its data on disk, but in memory (RAM).

As a consequence there is no right answer to your question.

If you want a cache backend that keeps its data on disk use FileBasedCache, but keep in mind that its much slower than memcached.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top