summaryrefslogtreecommitdiff
path: root/tests/regressiontests/cache
AgeCommit message (Collapse)Author
2011-09-08Fixed #16686 -- Reduced time to wait for cache expiration in a test to ↵Jannis Leidel
alleviate race-condition-y effects. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23Fixed #15499 -- Ensure that cache control headers don't try to set public ↵Russell Keith-Magee
and private as a result of multiple calls to patch_cache_control with different arguments. Thanks to AndiDog for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29Fixed #16533 -- Stopped the memcache cache backend from raising an exception ↵Jannis Leidel
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
2011-07-13Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel
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
2011-07-05Rolled back r16510, r16513 and r16514 because it wasn't ready.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05Removed left over print statement.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05Made cache table test case multidb capable. Refs #16411. Thanks, Russ.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05Fixed test failure on Postgres that was added in r16510.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05Fixed #16410 -- Fixed get_cache to behave gracefully when given a string ↵Jannis Leidel
that can't be split. Thanks, jedie. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04Fixed #15255 -- Stopped database cache from ignoring database routers when ↵Jannis Leidel
creating the cache table. Thanks, aaugustin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10Fixed #16196 - Redundant or incorrect code in testsLuke Plant
Thanks to intelliyole and melinath for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Fixed #15704 -- Made cache tests more reusable by moving the backend path ↵Adrian Holovaty
into a class attribute. Thanks for the patch, jonash git-svn-id: http://code.djangoproject.com/svn/django/trunk@16008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Removed a bunch more Python 2.4 workarounds now that we don't support that ↵Adrian Holovaty
version. Refs #15702 -- thanks to jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-19Fixed #13686 -- Ensure that memcache handling of unicode values in add() and ↵Russell Keith-Magee
set_many() is consistent with the handling provided by get() and set(). Thanks to nedbatchelder for the report, and to jbalogh, accuser and Jacob Burch for their work ont the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15880 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03Updated test assertions that have been deprecated by the move to unittest2. ↵Russell Keith-Magee
In summary, this means: assert_ -> assertTrue assertEquals -> assertEqual failUnless -> assertTrue For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-02Fixed #4992 -- Respect the GET request query string when creating cache ↵Jannis Leidel
keys. Thanks PeterKz and guettli for the initial patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-17Fixed #15260 -- Ensured that CACHE_MIDDLEWARE_ANONYMOUS_ONLY is effective ↵Carl Meyer
with the cache_page decorator, not only the middleware. Thanks to brodie for report and draft patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15559 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-17Reduced code duplication in cache middleware tests.Carl Meyer
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01Fixed #13283 -- Corrected CACHE_MIDDLEWARE_ANONYMOUS_ONLY's bad habit of ↵Carl Meyer
setting Vary: Cookie on all responses and destroying cache efficiency. Thanks to natrius for the fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-24Fixed #15144 -- Corrected some problems with the Cache middleware when used ↵Russell Keith-Magee
with multiple cache settings. Thanks to Jim Dalton for the report, and to Jim and Joshua Ginsberg for the work on the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22Beefed up the tests for multi-cache handling of the cache middleware and ↵Russell Keith-Magee
view decorators, and made a couple of tweaks for edge cases as a result. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-21Fixed #11675 -- Added support for the PyLibMC cache library. In order to ↵Russell Keith-Magee
support this, and clean up some other 1.3 caching additions, this patch also includes some changes to the way caches are defined. This means you can now have multiple caches, in the same way you have multiple databases. A huge thanks to Jacob Burch for the work on the PyLibMC backend, and to Jannis for his work on the cache definition changes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12Fixed #14103 -- Take USE_ETAGS setting into account when patching the ↵Jannis Leidel
response headers. Thanks, trbs and Eric Holscher. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-19Fixed #13795 -- Added a site-wide cache prefix and cache versioning. Thanks ↵Russell Keith-Magee
to bruth for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11Fixed #14508 - test suite silences warnings.Luke Plant
Utility functions get_warnings_state and save_warnings_state have been added to django.test.utils, and methods to django.test.TestCase for convenience. The implementation is based on the catch_warnings context manager from Python 2.6. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02Fixed #14596 -- Light refactoring of the cache backends.Russell Keith-Magee
* Removes some code duplication, * Provides a convenient base class for db-like cache backends * Adds tests for an edge case of culling, * Marks the memcached tests as "skipped", rather than omitting them. Thanks to Jonas H for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29Fixed #14560 -- Enable HEAD requests to be cached properly. Thanks, codemonkey!Honza Král
Introducing ability to cache HEAD requests and GET requests separately by adding the method to the cache key while preserving the functionality that HEAD requests can use cached reponses generated by a GET request. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12Add warning when using cache keys that might not work with memcached.Malcolm Tredinnick
This means testing with local dev caches (not memcache) will warn developers if they are introducing inadvertent importabilities. There is also the ability to silence the warning if a dev is not planning to use memcache and knows what they are doing with their keys. Thanks to Carl Meyer for the patch. Fixed #6447. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-31Fixed #14199 -- Added a missing table creation statement in the db cache ↵Russell Keith-Magee
backend cull implementation, and added tests for cache culling. Thanks to Tim for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13678 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-03-01Refined changes made in r12546 to also respect the request.LANGUAGE_CODE in ↵Jannis Leidel
case the LocaleMiddleware is used to discover the language preference. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12624 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-23Fixed #5691 - Adds the active language to the cache key. Thanks, Antoni ↵Jannis Leidel
Aloy, Ramiro Morales and Yann Malet. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12546 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 #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
2009-10-29Fixed #12057 -- Corrected regression of caching performance when a model ↵Russell Keith-Magee
contained a callable default. Thanks to Michael Thornhill for the excellent assistance tracking this problem. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-04-01Fixed #10016: the cache middleware no longer vomits when handed long URLs. ↵Jacob Kaplan-Moss
Thanks, Matt Croydon. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-17Fixed #10517 -- Corrected cache name for file-based cache tests so that the ↵Russell Keith-Magee
filename can be valid under Windows. Thanks to Bob Thomas for the report and fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10071 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
2008-10-10More be-nice-to-the-buildbot: be better about cleaning up files created by ↵Jacob Kaplan-Moss
the cache/session tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9224 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-07-26Removed some completely pointless test changes from [8084], since they wereMalcolm Tredinnick
already being tested. Thank, Marty. /me is dumb. :-( git-svn-id: http://code.djangoproject.com/svn/django/trunk@8085 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
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-19Removed `vary_delim_re` in `django/utils/cache.py` in favor of existing ↵Gary Wilson Jr
`cc_delim_re` since the latter is more correct in parsing the header (allows whitespace before and after comma separators instead of just after). As a bonus, tests added for `patch_vary_headers()`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6696 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