summaryrefslogtreecommitdiff
path: root/django/core/cache
AgeCommit message (Collapse)Author
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-02Fixed all E261 warningscoagulant
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-10-24Start attacking E231 violationsAlex Gaynor
2013-10-01Fixed #21147 -- Avoided time.time precision issue with cache backends.Michael Manfre
The precision of time.time() is OS specific and it is possible for the resolution to be low enough to allow reading a cache key previously set with a timeout of 0.
2013-09-26Fixed #21146 - DatabaseCache converts expires to python valueMichael Manfre
DatabaseCache uses raw cursors to bypass the ORM. This prevents it from being used by database backends that require special handling of datetime values. There is no easy way to test this, so no tests added.
2013-09-19Fixed #21125 -- Removed support for cache URI syntaxCurtis Maloney
2013-09-10Fixed #20841 -- Added messages to NotImplementedErrorsGregor MacGregor
Thanks joseph at vertstudios.com for the suggestion.
2013-09-06Fixed a number of flake8 errors -- particularly around unused imports and ↵Alex Gaynor
local variables
2013-09-05Took advantage of django.utils.six.moves.urllib.*.Aymeric Augustin
2013-08-30Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-07-29Deprecated django.utils.importlibClaude Paroz
This was a shim for pre-Python 2.7 support.
2013-07-09Fixed #20722 -- Fixed MemcachedCache backend get_many on Python 3.Tim Graham
2013-07-08A few cleanups to capture the minimum amount of code in try/except blocks.Alex Gaynor
2013-07-06Fixed 20613 - moved pickle loads/dumps outside with ↵ersran9
self._lock.reader()/writer() blocks Additionaly added pickled=None initially and check for none before returning in get
2013-05-18Fixed #9595 -- Allow non-expiring cache timeouts.Jacob Burch
Also, streamline the use of 0 and None between cache backends.
2013-03-13Made atomic usable when autocommit is off.Aymeric Augustin
Thanks Anssi for haggling until I implemented this. This change alleviates the need for atomic_if_autocommit. When autocommit is disabled for a database, atomic will simply create and release savepoints, and not commit anything. This honors the contract of not doing any transaction management. This change also makes the hack to allow using atomic within the legacy transaction management redundant. None of the above will work with SQLite, because of a flaw in the design of the sqlite3 library. This is a known limitation that cannot be lifted without unacceptable side effects eg. triggering arbitrary commits.
2013-03-11Fixed #11569 -- Wrapped DatabaseCache._base_set in an atomic block.Aymeric Augustin
The atomic block provides a clean rollback to a savepoint on failed writes. The ticket reported a race condition which I don't know how to test.
2013-03-11Deprecated transaction.commit/rollback_unless_managed.Aymeric Augustin
Since "unless managed" now means "if database-level autocommit", committing or rolling back doesn't have any effect. Restored transactional integrity in a few places that relied on automatically-started transactions with a transitory API.
2013-02-24Fixed #19253 -- Extracted template cache key building logicTomek Paczkowski
Introduced a public function django.core.cache.utils.make_template_fragment_key Thanks @chrismedrela for fruitful cooperation.
2013-02-24Fixed #19810 -- MemcachedCache now uses pickle.HIGHEST_PROTOCOLBas Peschier
2013-02-24Fixed #19896 -- Committed after clearing cache in the database.George Song
2013-02-05Fixed #19689 -- Renamed `Model._meta.module_name` to `model_name`.Simon Charette
2013-02-04Fixed #17061 -- Factored out importing object from a dotted pathClaude Paroz
Thanks Carl Meyer for the report.
2012-12-29Removed django.core.cache.backends.memcached.CacheClass.Aymeric Augustin
2012-11-11Tweaked cache key creation to avoid strict typing.Aymeric Augustin
This is a provisional change. See #19221 for details.
2012-11-11Merge pull request #218 from mgrouchy/ticket_18582Aymeric Augustin
Fixed #18582 -- Added a no-op close to BaseCache
2012-11-10Fixed #19273 -- Fixed DB cache backend on pg 9.0+ and py3Anssi Kääriäinen
There was a problem caused by Postgres 9.0+ having bytea_output default value of 'hex' and cache backend inserting the content as 'bytes' into a column of type TEXT. Fixed by converting the bytes value to a string before insert.
2012-11-10Removed an impossible code path in cache functionClaude Paroz
2012-11-06Fixed #14315 -- Made memcached backend handle negative incr/decr valuesClaude Paroz
Thanks Michael Manfre for the report and initial patch and Tobias McNulty for the review.
2012-09-07Removed many uses of bare "except:", which were either going to a) silence ↵Alex Gaynor
real issues, or b) were impossible to hit.
2012-08-30Replaced some smart_xxx by force_xxx equivalentClaude Paroz
smart_str/smart_text should only be used when a potential lazy string should be preserved in the result of the function call.
2012-08-29Replaced many smart_bytes by force_bytesClaude Paroz
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
2012-08-18[py3] Fixed cache tests.Aymeric Augustin
2012-08-15[py3] Fixed more encoding issues in cache testsClaude Paroz
2012-08-15Fixed #18770 -- memcached cache backend expects byte strings as keysClaude Paroz
Thanks thecore for the report.
2012-08-14[py3] Avoided the deprecated base64 interface.Aymeric Augustin
This fixes a deprecation warning under Python 3.
2012-08-13[py3] Fixed encoding issues in cache key generationClaude Paroz
2012-08-12[py3] Encoded value before feeding it to hashlib.md5Claude Paroz
2012-08-07[py3] Ported django.utils.encoding.Aymeric Augustin
* Renamed smart_unicode to smart_text (but kept the old name under Python 2 for backwards compatibility). * Renamed smart_str to smart_bytes. * Re-introduced smart_str as an alias for smart_text under Python 3 and smart_bytes under Python 2 (which is backwards compatible). Thus smart_str always returns a str objects. * Used the new smart_str in a few places where both Python 2 and 3 want a str.
2012-07-22[py3] Switched to Python 3-compatible imports.Aymeric Augustin
xrange/range will be dealt with in a separate commit due to the huge number of changes.
2012-07-22[py3] Updated urllib/urllib2/urlparse imports.Aymeric Augustin
Lots of functions were moved. Use explicit imports in all cases to keey it easy to identify where the functions come from.
2012-07-22[py3] Replaced basestring by six.string_types.Aymeric Augustin
2012-07-18BaseCache now has a no-op close method as per ticket #18582Mike Grouchy
Also removed the hasattr check when firing request_finished signal for caches with a 'close' method. Should be safe to call `cache.close` everywhere now
2012-07-05Fixed #18330 - Made cache culling 3rd party db backend friendlyAnssi Kääriäinen
This is Ian Kelly's patch from #15580 with minor modifications.
2012-05-05Made more extensive usage of context managers with open.Claude Paroz
2012-05-03Fixed #18042 -- Advanced deprecation warnings.Aymeric Augustin
Thanks Ramiro for the patch.
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).