Ticket #12195: 12195.diff
File 12195.diff, 798 bytes (added by , 15 years ago) |
---|
-
docs/topics/cache.txt
470 470 471 471 >>> from django.core.cache import cache 472 472 473 The basic interface is ``set(key, value, timeout _seconds)`` and ``get(key)``::473 The basic interface is ``set(key, value, timeout)`` and ``get(key)``:: 474 474 475 475 >>> cache.set('my_key', 'hello, world!', 30) 476 476 >>> cache.get('my_key') 477 477 'hello, world!' 478 478 479 The ``timeout _seconds`` argument is optional and defaults to the ``timeout``479 The ``timeout`` argument is optional and defaults to the ``timeout`` 480 480 argument in the ``CACHE_BACKEND`` setting (explained above). 481 481 482 482 If the object doesn't exist in the cache, ``cache.get()`` returns ``None``::