From 7be638390e18fcbfaaed638f9908673360c280d3 Mon Sep 17 00:00:00 2001 From: Jaap Roes Date: Mon, 26 Aug 2013 16:34:02 +0200 Subject: Fixed #20536 -- rewrite of the file based cache backend * Safer for use in multiprocess environments * Better random culling * Cache files use less disk space * Safer delete behavior Also fixed #15806, fixed #15825. --- docs/topics/cache.txt | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt index f61e3ffbd3..7f710613e9 100644 --- a/docs/topics/cache.txt +++ b/docs/topics/cache.txt @@ -253,10 +253,11 @@ model. Filesystem caching ------------------ -To store cached items on a filesystem, use -``"django.core.cache.backends.filebased.FileBasedCache"`` for -:setting:`BACKEND `. For example, to store cached data in -``/var/tmp/django_cache``, use this setting:: +The file-based backend serializes and stores each cache value as a separate +file. To use this backend set :setting:`BACKEND ` to +``"django.core.cache.backends.filebased.FileBasedCache"`` and +:setting:`LOCATION ` to a suitable directory. For example, +to store cached data in ``/var/tmp/django_cache``, use this setting:: CACHES = { 'default': { @@ -265,7 +266,6 @@ To store cached items on a filesystem, use } } - If you're on Windows, put the drive letter at the beginning of the path, like this:: @@ -286,10 +286,6 @@ above example, if your server runs as the user ``apache``, make sure the directory ``/var/tmp/django_cache`` exists and is readable and writable by the user ``apache``. -Each cache value will be stored as a separate file whose contents are the -cache data saved in a serialized ("pickled") format, using Python's ``pickle`` -module. Each file's name is the cache key, escaped for safe filesystem use. - Local-memory caching -------------------- -- cgit v1.3