0

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.

4

1 回答 1

0

cache_utils.group_backend是一个缓存后端,将数据存储在memcached中。它本身不会将其存储在任何地方 -C驱动器或其他任何地方。Memcached 也不将其数据保存在磁盘上,而是保存在内存 (RAM) 中。

因此,您的问题没有正确答案。

如果您想要一个将数据保存在磁盘上的缓存后端,请使用FileBasedCache,但请记住它比 memcached 慢得多。

于 2014-04-24T14:51:43.493 回答