Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Documentation -- Improved description of cache arguments

- Fixed some grammar and formatting mistakes
- Added the type and default for CULL_FREQUENCY
- Made the note on culling the entire cache more precise. (It's actually
  slower on the filesystem backend.)

Backport of 5eca021 from master
  • Loading branch information...
commit 4f0ea1aca4fce75de22878839f077fa1c1d9e21a 1 parent ed9b7b6
Kevin Christopher Henry authored September 10, 2013 timgraham committed September 11, 2013

Showing 1 changed file with 13 additions and 16 deletions. Show diff stats Hide diff stats

  1. 29  docs/topics/cache.txt
29  docs/topics/cache.txt
@@ -341,40 +341,37 @@ been well-tested and are easy to use.
341 341
 Cache arguments
342 342
 ---------------
343 343
 
344  
-In addition to the defining the engine and name of the each cache
345  
-backend, each cache backend can be given additional arguments to
346  
-control caching behavior. These arguments are provided as additional
347  
-keys in the :setting:`CACHES` setting. Valid arguments are as follows:
  344
+Each cache backend can be given additional arguments to control caching
  345
+behavior. These arguments are provided as additional keys in the
  346
+:setting:`CACHES` setting. Valid arguments are as follows:
348 347
 
349 348
 * :setting:`TIMEOUT <CACHES-TIMEOUT>`: The default timeout, in
350  
-  seconds, to use for the cache. This argument defaults to 300
  349
+  seconds, to use for the cache. This argument defaults to ``300``
351 350
   seconds (5 minutes).
352 351
 
353 352
 * :setting:`OPTIONS <CACHES-OPTIONS>`: Any options that should be
354  
-  passed to cache backend. The list options understood by each
355  
-  backend vary with each backend.
  353
+  passed to the cache backend. The list of valid options will vary
  354
+  with each backend, and cache backends backed by a third-party library
  355
+  will pass their options directly to the underlying cache library.
356 356
 
357 357
   Cache backends that implement their own culling strategy (i.e.,
358 358
   the ``locmem``, ``filesystem`` and ``database`` backends) will
359 359
   honor the following options:
360 360
 
361  
-  * ``MAX_ENTRIES``: the maximum number of entries allowed in
  361
+  * ``MAX_ENTRIES``: The maximum number of entries allowed in
362 362
     the cache before old values are deleted. This argument
363 363
     defaults to ``300``.
364 364
 
365 365
   * ``CULL_FREQUENCY``: The fraction of entries that are culled
366 366
     when ``MAX_ENTRIES`` is reached. The actual ratio is
367  
-    ``1/CULL_FREQUENCY``, so set ``CULL_FREQUENCY``: to ``2`` to
368  
-    cull half of the entries when ``MAX_ENTRIES`` is reached.
  367
+    ``1 / CULL_FREQUENCY``, so set ``CULL_FREQUENCY`` to ``2`` to
  368
+    cull half the entries when ``MAX_ENTRIES`` is reached. This argument
  369
+    should be an integer and defaults to ``3``.
369 370
 
370 371
     A value of ``0`` for ``CULL_FREQUENCY`` means that the
371 372
     entire cache will be dumped when ``MAX_ENTRIES`` is reached.
372  
-    This makes culling *much* faster at the expense of more
373  
-    cache misses.
374  
-
375  
-  Cache backends backed by a third-party library will pass their
376  
-  options directly to the underlying cache library. As a result,
377  
-  the list of valid options depends on the library in use.
  373
+    On some backends (``database`` in particular) this makes culling *much*
  374
+    faster at the expense of more cache misses.
378 375
 
379 376
 * :setting:`KEY_PREFIX <CACHES-KEY_PREFIX>`: A string that will be
380 377
   automatically included (prepended by default) to all cache keys

0 notes on commit 4f0ea1a

Please sign in to comment.
Something went wrong with that request. Please try again.