Changed docs/cache.txt to remove db cache, because it's not done yet.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@583 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-08-31 17:06:07 +00:00
parent dbc4adeeda
commit 354421f77d
1 changed files with 5 additions and 11 deletions

View File

@ -14,8 +14,8 @@ Setting up the cache
The cache framework is split into a set of "backends" that provide different The cache framework is split into a set of "backends" that provide different
methods of caching data. There's a simple single-process memory cache (mostly methods of caching data. There's a simple single-process memory cache (mostly
useful as a fallback), a database-backed cache, and a memcached_ backend (by useful as a fallback) and a memcached_ backend (the fastest option, by far, if
far the fastest option if you've got the RAM). you've got the RAM).
Before using the cache, you'll need to tell Django which cache backend you'd Before using the cache, you'll need to tell Django which cache backend you'd
like to use. Do this by setting the ``CACHE_BACKEND`` in your settings file. like to use. Do this by setting the ``CACHE_BACKEND`` in your settings file.
@ -29,10 +29,6 @@ Examples:
memcached://127.0.0.1:11211/ A memcached backend; the server is running memcached://127.0.0.1:11211/ A memcached backend; the server is running
on localhost port 11211. on localhost port 11211.
db://tablename/ A database backend (the db backend uses
the same database/username as the rest of
the CMS, so only a table name is needed.)
simple:/// A simple single-process memory cache; you simple:/// A simple single-process memory cache; you
probably don't want to use this except for probably don't want to use this except for
testing. Note that this cache backend is testing. Note that this cache backend is
@ -62,7 +58,6 @@ arguments are:
For example:: For example::
DB_CACHE = "memcached://127.0.0.1:11211/?timeout=60" DB_CACHE = "memcached://127.0.0.1:11211/?timeout=60"
DB_CACHE = "db://tablename/?timeout=120&max_entries=500&cull_percentage=4"
Invalid arguments are silently ignored, as are invalid values of known Invalid arguments are silently ignored, as are invalid values of known
arguments. arguments.
@ -172,8 +167,7 @@ The cache API is simple::
# There's also a way to delete keys explicitly. # There's also a way to delete keys explicitly.
>>> cache.delete('a') >>> cache.delete('a')
Really, that's the entire API! There are very few restrictions on what you can That's it. The cache has very few restrictions: You can cache any object that
use the cache for; you can store any object in the cache that can be pickled can be pickled safely, although keys must be strings.
safely, although keys must be strings.
.. _memcached: http://www.danga.com/memcached/ .. _memcached: http://www.danga.com/memcached/