summaryrefslogtreecommitdiff
path: root/django/core/cache
AgeCommit message (Collapse)Author
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-09-02Fixed #11331 -- Stopped closing pylibmc connections after each request.Ed Morley
libmemcached manages its own connections, so isn't affected by refs #5133.
2016-08-31Fixed #27152 -- Supported comma delimiter in memcached LOCATION string.Ed Morley
2016-08-31Fixed #20892 -- Allowed configuring memcached client using OPTIONS.Ed Morley
Previously, the MemcachedCache backend ignored `OPTIONS` and PyLibMCCache used them to set pylibmc behaviors. Both backends now pass `OPTIONS` as keyword arguments to the client constructors.
2016-07-11Fixed #26792 -- Allowed None for the value of cache.get_or_set().Dmitry S..ky / skype: dvska-at-skype
2016-06-15Fixed broken links in docs and comments.Ville Skyttä
2016-06-01Fixed #26694 -- Made FileBasedCache.get() reraise non-ENOENT IOErrors.Jon Dufresne
2016-05-31Fixed #26691 -- Removed checking for a file's existence before deleting.Jon Dufresne
File operations always raise a ENOENT error when a file doesn't exist. Checking the file exists before the operation adds a race condition condition where the file could be removed between operations. As the operation already raises an error on a missing file, avoid this race and avoid checking the file exists twice. Instead only check a file exists by catching the ENOENT error.
2016-04-08Fixed E128 flake8 warnings in django/.Tim Graham
2016-04-05Fixed #26462 -- Fixed Python 2 UnicodeEncodeError when warning about long ↵Przemysław Suliga
cache keys.
2016-04-04Fixed #26460 -- Issued a single warning for invalid cache keyPrzemysław Suliga
2016-03-08Fixed #26332 -- Fixed a race condition in BaseCache.get_or_set().Przemysław Suliga
2016-01-25Fixed #26125 -- Fixed E731 flake warnings.userimack
2015-12-29Fixed typo in BaseCache.delete_many() docstring.Matthew Madurski
2015-12-04Fixed #25840 -- Fixed BaseCache.get_or_set() on the DummyCache backend.Emre Yilmaz
This also fixes a possible data eviction race condition between setting and getting a key. Another thread could remove the key before get_and_set() accesses it again. In this case, now the default value will be returned instead of None.
2015-11-14Refs #25501 -- Fixed a typo in django/core/cache/backends/filebased.pyJaap Roes
The original intent in refs #20536 was to use the highest protocol. Calling zlib.compress() with a compression level of -1 seems to fall back to the default level of 6.
2015-11-03Fixed #25668 -- Misc spelling errorsVille Skyttä
2015-10-20Fixed #25501 -- Made the file-based cache backend use the highest pickling ↵Andrew Artajos
protocol.
2015-09-18Fixed #25034 -- Converted caches ImproperlyConfigured error to a system check.Tom Christie
2015-09-16Fixed typo in django/core/cache/backends/base.py docstring.Matthew Crowson
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-07-06Updated Memcached get_backend_timeout() comment.Karol Duleba
2015-06-27Sorted imports in __init__.py files.Tim Graham
2015-05-17Refactored datetime handling in the database cache backend.Aymeric Augustin
Took advantage of the new database adapters and converters.
2015-05-17Renamed value_to_db_xxx to adapt_xxxfield_value.Aymeric Augustin
This mirrors convert_xxxfield_value nicely, taking advantage of the adapter/converter terminology which is commonly used by DB-API modules.
2015-05-17Removed global timezone-aware datetime converters.Aymeric Augustin
Refs #23820.
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak
2015-03-14Fixed #12982 -- Added a get_or_set() method to the BaseCache backend.Berker Peksag
2015-02-20Fixed #24351, #24346 -- Changed the signature of allow_migrate().Loic Bistuer
The new signature enables better support for routing RunPython and RunSQL operations, especially w.r.t. reusable and third-party apps. This commit also takes advantage of the deprecation cycle for the old signature to remove the backward incompatibility introduced in #22583; RunPython and RunSQL won't call allow_migrate() when when the router has the old signature. Thanks Aymeric Augustin and Tim Graham for helping shape up the patch. Refs 22583.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-17Removed BaseMemcachedCacheMethods._get_memcache_timeout backwards ↵Tim Graham
compatibility shim. Per deprecation timeline; refs #21147.
2015-01-17Removed django.core.cache.get_cache() per deprecation timeline; refs #21012.Tim Graham
2014-11-13Fixed #16358 - Made memcache backend delete old value on a failure to set.Michael Manfre
Default Memcached configuration allows for a maximum object of 1MB and will fail to set the key if it is too large. The key will be deleted from memcached if it fails to be set. This is needed to avoid an issue with cache_db session backend using the old value stored in memcached, instead of the newer value stored in the database.
2014-10-12Fixed #23642 -- Made LocMemCache.incr() thread-safe as documentedThomas Chaumeny
2014-10-10Fixed #23625 -- Removed CacheClass shimJaap Roes
2014-06-16Fixed #22845 -- Correctly handled memcached default timeout value.Vincent-Vega
2014-05-09Fixed #22606 -- Locmemcache has_key() failed for infinite cache expiryMalcolm Box
Refactored cache expiry logic for Locmemcache to make consistent across all places where accessed, and correctly handle None as expiry time.
2014-04-23Fixed #22495 -- Locmem cache.add() failed with infinite timeoutsMalcolm Box
cache.add() incorrectly succeeded when there was an existing key with an infinite (None) timeout.
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2014-03-04Fixed #22085 -- Added a feature for setting non-expiring keys as the default.zedr
This feature allows the default `TIMEOUT` Cache argument to be set to `None`, so that cache instances can set a non-expiring key as the default, instead of using the default value of 5 minutes. Previously, this was possible only by passing `None` as an argument to the set() method of objects of type `BaseCache` (and subtypes).
2014-02-08Fixed #21674 -- Deprecated the import_by_path() function in favor of ↵Berker Peksag
import_string(). Thanks Aymeric Augustin for the suggestion and review.
2014-02-02Ensure cursors are closed when no longer needed.Michael Manfre
This commit touchs various parts of the code base and test framework. Any found usage of opening a cursor for the sake of initializing a connection has been replaced with 'ensure_connection()'.
2013-11-24flake8 fixesAlex Gaynor
2013-11-24Properly closed cache connections at the end of the request.Florian Apolloner
This only affects the new cache api and not the deprecated get_cache. Refs #21012
2013-11-23Follow up to e112654fc81ddb3fbffbb8382b004d69367a85feFlorian Apolloner
Actually comitted the code now :þ
2013-11-23A handful of flake8 fixesAlex Gaynor
2013-11-23Fixed #21012 -- New API to access cache backends.Curtis Maloney
Thanks Curtis Malony and Florian Apolloner. Squashed commit of the following: commit 3380495e93f5e81b80a251b03ddb0a80b17685f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:18:07 2013 +0100 Looked up the template_fragments cache at runtime. commit 905a74f52b24a198f802520ff06290a94dedc687 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 14:19:48 2013 +0100 Removed all uses of create_cache. Refactored the cache tests significantly. Made it safe to override the CACHES setting. commit 35e289fe9285feffed3c60657af9279a6a2cfccc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:23:57 2013 +0100 Removed create_cache function. commit 8e274f747a1f1c0c0e6c37873e29067f7fa022e8 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sat Nov 23 12:04:52 2013 +0100 Updated docs to describe a simplified cache backend API. commit ee7eb0f73e6d4699edcf5d357dce715224525cf6 Author: Curtis Maloney <curtis@tinbrain.net> Date: Sat Oct 19 09:49:24 2013 +1100 Fixed #21012 -- Thread-local caches, like databases.
2013-11-07Fixed a couple flake8 warnings.Tim Graham
2013-11-07Fixed #20536 -- rewrite of the file based cache backendJaap Roes
* Safer for use in multiprocess environments * Better random culling * Cache files use less disk space * Safer delete behavior Also fixed #15806, fixed #15825.