Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/core/cache
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed #9595 -- Allow non-expiring cache timeouts.Jacob Burch2013-05-186-36/+53
| | | | Also, streamline the use of 0 and None between cache backends.
* Made atomic usable when autocommit is off.Aymeric Augustin2013-03-131-1/+1
| | | | | | | | | | | | | | | | 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.
* Fixed #11569 -- Wrapped DatabaseCache._base_set in an ↵Aymeric Augustin2013-03-111-14/+15
| | | | | | | | atomic block. 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.
* Deprecated transaction.commit/rollback_unless_managed.Aymeric Augustin2013-03-111-6/+1
| | | | | | | | 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.
* Fixed #19253 -- Extracted template cache key building logicTomek Paczkowski2013-02-241-0/+15
| | | | | | Introduced a public function django.core.cache.utils.make_template_fragment_key Thanks @chrismedrela for fruitful cooperation.
* Fixed #19810 -- MemcachedCache now uses ↵Bas Peschier2013-02-241-0/+7
| | | | pickle.HIGHEST_PROTOCOL
* Fixed #19896 -- Committed after clearing cache in the ↵George Song2013-02-241-0/+1
| | | | database.
* Fixed #19689 -- Renamed `Model._meta.module_name` to ↵Simon Charette2013-02-051-1/+1
| | | | `model_name`.
* Fixed #17061 -- Factored out importing object from a ↵Claude Paroz2013-02-042-13/+10
| | | | | | dotted path Thanks Carl Meyer for the report.
* Removed django.core.cache.backends.memcached.CacheClass.Aymeric Augustin2012-12-291-17/+0
|
* Tweaked cache key creation to avoid strict typing.Aymeric Augustin2012-11-111-1/+2
| | | | This is a provisional change. See #19221 for details.
* Merge pull request #218 from mgrouchy/ticket_18582Aymeric Augustin2012-11-112-5/+12
|\ | | | | Fixed #18582 -- Added a no-op close to BaseCache
| * BaseCache now has a no-op close method as per ticket #18582Mike Grouchy2012-07-182-5/+12
| | | | | | | | | | | | 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
* | Fixed #19273 -- Fixed DB cache backend on pg 9.0+ and py3Anssi Kääriäinen2012-11-101-4/+8
| | | | | | | | | | | | | | 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.
* | Removed an impossible code path in cache functionClaude Paroz2012-11-101-2/+0
| |
* | Fixed #14315 -- Made memcached backend handle negative ↵Claude Paroz2012-11-061-0/+6
| | | | | | | | | | | | | | incr/decr values Thanks Michael Manfre for the report and initial patch and Tobias McNulty for the review.
* | Removed many uses of bare "except:", which were either ↵Alex Gaynor2012-09-071-1/+1
| | | | | | | | going to a) silence real issues, or b) were impossible to hit.
* | Replaced some smart_xxx by force_xxx equivalentClaude Paroz2012-08-301-2/+2
| | | | | | | | | | smart_str/smart_text should only be used when a potential lazy string should be preserved in the result of the function call.
* | Replaced many smart_bytes by force_bytesClaude Paroz2012-08-292-4/+4
| | | | | | | | | | | | 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.
* | [py3] Fixed cache tests.Aymeric Augustin2012-08-181-1/+1
| |
* | [py3] Fixed more encoding issues in cache testsClaude Paroz2012-08-151-1/+2
| |
* | Fixed #18770 -- memcached cache backend expects byte ↵Claude Paroz2012-08-151-0/+5
| | | | | | | | | | | | strings as keys Thanks thecore for the report.
* | [py3] Avoided the deprecated base64 interface.Aymeric Augustin2012-08-141-2/+2
| | | | | | | | This fixes a deprecation warning under Python 3.
* | [py3] Fixed encoding issues in cache key generationClaude Paroz2012-08-131-3/+3
| |
* | [py3] Encoded value before feeding it to hashlib.md5Claude Paroz2012-08-121-1/+2
| |
* | [py3] Ported django.utils.encoding.Aymeric Augustin2012-08-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | [py3] Switched to Python 3-compatible imports.Aymeric Augustin2012-07-223-3/+3
| | | | | | | | | | xrange/range will be dealt with in a separate commit due to the huge number of changes.
* | [py3] Updated urllib/urllib2/urlparse imports.Aymeric Augustin2012-07-221-1/+4
| | | | | | | | | | Lots of functions were moved. Use explicit imports in all cases to keey it easy to identify where the functions come from.
* | [py3] Replaced basestring by six.string_types.Aymeric Augustin2012-07-221-1/+3
|/
* Fixed #18330 - Made cache culling 3rd party db backend ↵Anssi Kääriäinen2012-07-051-11/+3
| | | | | | friendly This is Ian Kelly's patch from #15580 with minor modifications.
* Made more extensive usage of context managers with open.Claude Paroz2012-05-051-18/+9
|
* Fixed #18042 -- Advanced deprecation warnings.Aymeric Augustin2012-05-031-1/+1
| | | | Thanks Ramiro for the patch.
* Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz2012-04-291-1/+1
| | | | | Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
* Fixed #18220 -- Removed the CACHE_BACKEND setting, as ↵Claude Paroz2012-04-291-36/+0
| | | | | | per official deprecation timeline. Thanks Ramiro Morales for the review.
* Fixed #18029 -- Removed mod_python as of deprecation ↵Claude Paroz2012-03-311-6/+2
| | | | | | process. Thanks Aymeric Augustin for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17835 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #17965 -- Definitely dropped support for Python ↵Claude Paroz2012-03-311-6/+1
| | | | | | 2.5. Thanks jonash for the initial patch and Aymeric Augustin for the review. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Removed with_statement imports, useless in Python >= ↵Claude Paroz2012-03-301-2/+0
| | | | | | 2.6. Refs #17965. Thanks jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #17286 -- Made sure all cache backends are set up ↵Jannis Leidel2012-02-091-6/+7
| | | | | | to connect to the signal handler that closes the cache connection when the request has been processed. Thanks, gnosek. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17479 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Clean up the the locmem cache backend and utils.synch by ↵Alex Gaynor2011-11-271-40/+20
| | | | | | using context managers. Puch prettier. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #17287 -- Prevented LocMemCache.incr/decr from ↵Carl Meyer2011-11-261-0/+16
| | | | | | changing key expiry time. Thanks Ivan Virabyan for report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17151 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16378. Locmem now uses pickle.HIGHEST_PROTOCOL ↵Paul McMillan2011-11-212-4/+8
| | | | | | for better compatibility with other hash backends. Thanks aaugustin for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Made the database cache backend, which bypasses the ORM, ↵Aymeric Augustin2011-11-201-15/+52
| | | | | | compatible with time zone support. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16162. Added timeout arg to ↵Alex Gaynor2011-09-101-1/+1
| | | | | | `DummyCache.set_many`, for compatiblity with other caches. Thanks to aaugustin for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed a bunch of imports of the email stdlib module now ↵Jannis Leidel2011-09-091-1/+1
| | | | | | that we are on Python 2.5 to ease the Python 3 port. Thanks, Martin von Löwis. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16481 -- Adapted one raw SQL query in cull ↵Ramiro Morales2011-08-211-1/+7
| | | | | | immplementation of the database-based cache backend so it works with Oracle. Thanks Aymeric Augustin for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16533 -- Stopped the memcache cache backend from ↵Jannis Leidel2011-07-291-1/+1
| | | | | | raising an exception if the timeout value isn't an integer. Thanks, Jeff Balogh. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16225 -- Removed unused imports. Many thanks to ↵Jannis Leidel2011-07-133-6/+7
| | | | | | Aymeric Augustin for the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16410 -- Fixed get_cache to behave gracefully ↵Jannis Leidel2011-07-051-3/+3
| | | | | | when given a string that can't be split. Thanks, jedie. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16155 -- Removed Python 2.4 compatibility ↵Ramiro Morales2011-06-091-2/+1
| | | | | | constructs from code and mentions from docs. Thanks Aymeric Augustin for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added missing warnings importRussell Keith-Magee2011-04-021-0/+1
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@16001 bcc190cf-cafb-0310-a4f2-bffc1f526a37