Django

Code

Changeset 583

Show
Ignore:
Timestamp:
08/31/05 12:06:07 (3 years ago)
Author:
adrian
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/cache.txt

    r283 r583  
    1515The cache framework is split into a set of "backends" that provide different 
    1616methods of caching data. There's a simple single-process memory cache (mostly 
    17 useful as a fallback), a database-backed cache, and a memcached_ backend (by 
    18 far the fastest option if you've got the RAM). 
     17useful as a fallback) and a memcached_ backend (the fastest option, by far, if 
     18you've got the RAM). 
    1919 
    2020Before using the cache, you'll need to tell Django which cache backend you'd 
    2121like to use. Do this by setting the ``CACHE_BACKEND`` in your settings file. 
    2222 
    23 The CACHE_BACKEND setting is a "fake" URI (really an unregistered scheme).  
     23The CACHE_BACKEND setting is a "fake" URI (really an unregistered scheme). 
    2424Examples: 
    2525 
     
    2929    memcached://127.0.0.1:11211/    A memcached backend; the server is running 
    3030                                    on localhost port 11211. 
    31  
    32     db://tablename/                 A database backend (the db backend uses 
    33                                     the same database/username as the rest of 
    34                                     the CMS, so only a table name is needed.) 
    3531 
    3632    simple:///                      A simple single-process memory cache; you 
     
    6359 
    6460    DB_CACHE = "memcached://127.0.0.1:11211/?timeout=60" 
    65     DB_CACHE = "db://tablename/?timeout=120&max_entries=500&cull_percentage=4" 
    6661 
    6762Invalid arguments are silently ignored, as are invalid values of known 
     
    173168    >>> cache.delete('a') 
    174169 
    175 Really, that's the entire API! There are very few restrictions on what you can 
    176 use the cache for; you can store any object in the cache that can be pickled 
    177 safely, although keys must be strings. 
     170That's it. The cache has very few restrictions: You can cache any object that 
     171can be pickled safely, although keys must be strings. 
    178172 
    179173.. _memcached: http://www.danga.com/memcached/