Django

Code

Show
Ignore:
Timestamp:
08/05/08 12:15:33 (5 months ago)
Author:
jbronn
Message:

gis: Merged revisions 7981-8001,8003-8011,8013-8033,8035-8036,8038-8039,8041-8063,8065-8076,8078-8139,8141-8154,8156-8214 via svnmerge from trunk.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/gis

    • Property svnmerge-integrated changed from /django/trunk:1-7978 to /django/trunk:1-8214
  • django/branches/gis/docs/cache.txt

    r7768 r8215  
    77from database queries to template rendering to business logic -- to create the 
    88page that your site's visitor sees. This is a lot more expensive, from a 
    9 processing-overhead perspective, than your standard read-a-file-off-the-filesystem 
    10 server arrangement. 
     9processing-overhead perspective, than your standard 
     10read-a-file-off-the-filesystem server arrangement. 
    1111 
    1212For most Web applications, this overhead isn't a big deal. Most Web 
     
    160160    CACHE_BACKEND = 'locmem:///' 
    161161 
    162 Simple caching (for development) 
    163 -------------------------------- 
    164  
    165 A simple, single-process memory cache is available as ``"simple:///"``. This 
    166 merely saves cached data in-process, which means it should only be used in 
    167 development or testing environments. For example:: 
    168  
    169     CACHE_BACKEND = 'simple:///' 
    170  
    171 **New in Django development version:** This cache backend is deprecated and 
    172 will be removed in a future release. New code should use the ``locmem`` backend 
    173 instead. 
    174  
    175162Dummy caching (for development) 
    176163------------------------------- 
     
    186173 
    187174    CACHE_BACKEND = 'dummy:///' 
     175 
     176Using a custom cache backend 
     177---------------------------- 
     178 
     179**New in Django development version** 
     180 
     181While Django includes support for a number of cache backends out-of-the-box, 
     182sometimes you will want to use a customised verison or your own backend.  To 
     183use an external cache backend with Django, use a Python import path as the 
     184scheme portion (the part before the initial colon) of the ``CACHE_BACKEND`` 
     185URI, like so:: 
     186 
     187    CACHE_BACKEND = 'path.to.backend://' 
     188 
     189If you're building your own backend, you can use the standard cache backends 
     190as reference implementations. You'll find the code in the 
     191``django/core/cache/backends/`` directory of the Django source. 
     192 
     193Note: Without a really compelling reason, like a host that doesn't support the 
     194them, you should stick to the cache backends included with Django. They've 
     195been really well-tested and are quite easy to use. 
    188196 
    189197CACHE_BACKEND arguments