summaryrefslogtreecommitdiff
path: root/django/core/cache
AgeCommit message (Collapse)Author
2010-05-04Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee
workarounds. Thanks to timo and claudep for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-04-16Fixed #13357 -- Minor changes to get Django running under PyPy. Thanks to ↵Russell Keith-Magee
Alex Gaynor for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-10Fixed #12427 -- Started the deprecation path for cmemcache support. Thanks ↵Russell Keith-Magee
to otherjacob for his work on this issue. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-01Fixed #11012: don't needless convert cache values to unicode.Jacob Kaplan-Moss
This means you can now successfully store binary blogs, such as compressed data, in the cache. Thanks to Matt Croydon for the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-11Fixed #11483 -- Modified db cache backend to use db backend functions for ↵Russell Keith-Magee
date conversion, avoiding problems under Jython. Thanks to Leo Soto for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-11Fixed #11623 -- Corrected table name quoting in db cache backend. Thanks to ↵Russell Keith-Magee
Fraser Nevett for the report and fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-11Fixed #12189 -- Corrected rollback behavior in database cache backend. ↵Russell Keith-Magee
Thanks to Lakin Wecker for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-11Fixed #12399 -- Added handling for memcache timeouts longer than 30 days. ↵Russell Keith-Magee
Thanks to houdinihound for the report, and gciotta for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12408 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-27Fixed #12671 -- Added set_many(), get_many(), and clear() methods to the ↵Russell Keith-Magee
cache backend interface. Thanks to Jeff Balogh for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Changed a whole bunch of places to raise exception instances instead of ↵Adrian Holovaty
old-style raising exception classes plus a comma. Good for the future Python 3 conversion git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13Fixed #10646: `cache.incr()` and `decr()` now fail consistantly under ↵Jacob Kaplan-Moss
python-memcache and cmemcache. Though it looks like this commit has no tests that's not so: this is tested for in `regressiontests/cache/tests.py` around like 183; these tests currently fail if ran against cmemcache. Thanks, andrewfong. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11855 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01Fixed #9644: fix a thread sync issue in the locmem cache. Thanks, mrts.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-18Fixed #8193: all dynamic imports in Django are now done correctly. I know ↵Jacob Kaplan-Moss
this because Brett Cannon borrowed the time machine and brought Python 2.7's '`importlib` back for inclusion in Django. Thanks for the patch-from-the-future, Brett! git-svn-id: http://code.djangoproject.com/svn/django/trunk@10088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-13Fixed #10488: fixed DB cache backend test failures in Oracle.Ian Kelly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10051 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-11Fixed #6464 -- Added incr() and decr() operations on cache backends. Atomic ↵Russell Keith-Magee
on Memcache; implemented as a 2 stage retrieve/update on other backends. Includes refactor of the cache tests to ensure all the backends are actually tested, and a fix to the DB cache backend that was discovered as a result. Thanks to Michael Malone for the original patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10031 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-08Fixed #9626 -- Fixed a deletion race in the locmem cache.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-02The database cache wasn't correctly handling expired keys. Fixed now.Malcolm Tredinnick
The cache tests have been failing for a long time with the db backend. This change makes them pass again, so no test changes required here. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-01Changed the way cache specifiers are parsed.Malcolm Tredinnick
Allows us to reuse the same code in multiple places, avoiding new and interesting bugs (the testing framework had a DIY version that was slightly wrong, for example). Fixed #9833. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-19Fixed #8410 -- Added a missing piece of value encoding for the memcachedMalcolm Tredinnick
backend. Patch from trbs. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8444 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16Fixed #5133 -- Explicitly close memcached connections after each requestMalcolm Tredinnick
(similar to database connection management). We can't effectively manage the lifecycle by pooling connections and recent versions of python-memcache can lead to connection exhaustion in some quite reasonable setups. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10Added a return value to the add() method for caches. It's now possible to tellMalcolm Tredinnick
if a call to add() ended up storing something in the cache. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02Fixed #7919 -- md5 and sha modules are deprecated since Python 2.5, use ↵Gary Wilson Jr
hashlib module when available. Patch from Karen Tracey. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02Removed several deprecated features for 1.0 (refs #7830):Gary Wilson Jr
* "simple" cache backend * `ObjectPaginator` * `edit_inline_type` argument for `ForeignKey` fields * `QOperator`, `QNot`, `QAnd` and `QOr` * `maxlength` argument git-svn-id: http://code.djangoproject.com/svn/django/trunk@8191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26Fixed #6413 -- Fixed a deadlock situation in the locmem culling implementation.Malcolm Tredinnick
Thanks, Joe Holloway. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8090 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-26Fixed #7967 -- Make sure the __contains__ method in the cache backends call theMalcolm Tredinnick
right has_key() method for the subclass. Patch from Marty Alchin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-25Fixed #7398 -- Allow for custom cache-backends to be used.Malcolm Tredinnick
Based on a patch from Lau Bech Lauritzen and Brenton Simpson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-11Fixe #6131 -- Fixed a problem with expired keys in the locmem cache. Based ↵Malcolm Tredinnick
on a patch from sherbang. In passing, changed the get() method to use a similar style to has_key() and made add() fractionally faster with the same sort of change (only compute time.time() when we really need it). git-svn-id: http://code.djangoproject.com/svn/django/trunk@6904 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-04Fixed #6099: the filebased cache backend now uses md5 hashes of keys instead ↵Jacob Kaplan-Moss
of sanitized filenames. For good measure, keys are partitioned into subdirectories using the first few bits of the hash. Thanks, sherbang. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-02Fixed #6086 -- Deprecate the "simple" cache backend in favour of "locmem".Malcolm Tredinnick
Thanks, Paul Bissex. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-30Edited docs and docstring changes from [6572] (new cache add() method)Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-21Fixed #5981 -- Fixed failing regression test when using locmem cache ↵Gary Wilson Jr
backend. Changed `add` to pickle the value as is done in `set`. Based on patch from mattmcc. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-21Fixed a bug in the db cache backend introduced in [6572].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-20Fixed #4831 -- Added an "add" cache key method, for parity with memcached'sMalcolm Tredinnick
API. This works for all cache backends. Patch from Matt McClanahan. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-16Fixed #4845 -- Fixed some problems with Unicode usage and caching. Thanks,Malcolm Tredinnick
Jeremy Dunck. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5718 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-15Changed imports to adhere to PEP 8.Gary Wilson Jr
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-15Fixed #3012 -- Changed the locmem cache backend to use pickle instead of ↵Gary Wilson Jr
deepcopy to make it compatible with iterators (which cannot be copied). Patch from Sundance. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-08Fixed #4041 -- Added a __contains__ method to cache backends. Thanks, GaryMalcolm Tredinnick
Wilson and SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-04-26Fixed #4040 -- Changed uses of has_key() to "in". Slight performanceMalcolm Tredinnick
improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-25Fixed #3648 -- Added support for cmemcached Python library. Thanks, ↵Adrian Holovaty
floguy@gmail.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@4827 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11Revert [4485] in order to fix accidental mod_python breakage. Refs #2920.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11Refs #2920 -- Replaced implicit uses of _() with explicit imports or calls ↵Russell Keith-Magee
to gettext(). At some point post 0.96, we need to remove the calls that put _ into the builtins. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-12Fixed #3290: DummyCache now conforms to the BaseCache interface correctly. ↵Jacob Kaplan-Moss
Thanks, Ned Batchelder. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30Fixed #2968 -- Changed arguments to __import__ to use empty dictionary ↵Adrian Holovaty
instead of empty string, for stricter compliance with Python library reference. Thanks for the patch, Yasushi Masuda git-svn-id: http://code.djangoproject.com/svn/django/trunk@3951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-18Fixed #2561 -- memcached cache backend no longer ignores default timeout. ↵Adrian Holovaty
Thanks for the report and patch, Christopher Lenz git-svn-id: http://code.djangoproject.com/svn/django/trunk@3611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21Fixed a bunch of spurious imports, typos, and other small errors turned up ↵Jacob Kaplan-Moss
by a pass through PyFlakes. This covers about the first third of the errors. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08Fixed #2109 -- Convert old-style classes to new-style classes throughout ↵Adrian Holovaty
Django. Thanks, Nicola Larosa git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty
backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-02-24Refactored cache from django/core/cache.py into django/core/cache package, ↵Adrian Holovaty
with each backend getting a separate module. This keeps things cleaner and uses less memory, because the backend module is only loaded if it's needed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2378 bcc190cf-cafb-0310-a4f2-bffc1f526a37