#15142: Contrib tests throwing errors on bare project when cache middleware 
enabled
and cache specified
-----------------------------------+----------------------------------------
          Reporter:  jsdalton      |         Owner:  nobody
            Status:  new           |     Milestone:  1.3   
         Component:  Contrib apps  |       Version:  SVN   
        Resolution:                |      Keywords:        
             Stage:  Accepted      |     Has_patch:  1     
        Needs_docs:  0             |   Needs_tests:  0     
Needs_better_patch:  0             |  
-----------------------------------+----------------------------------------
Changes (by russellm):

  * stage:  Unreviewed => Accepted

Comment:

 To clarify -- this only appears to be a problem for the memcache backend;
 locmem doesn't seem to cause any issues.

 I'm not completely convinced that @never_cache is the right solution here.
 Unit tests shouldn't require any special preparation to enable them to be
 test isolated -- the testing environment should provide those guarantees.
 However, any test involving caching will cause data to be put into a cache
 that can be easily lost.

 Django's test framework clears the database at the end of every test for
 exactly this reason; there is an argument that the cache should be flushed
 in the same way. However, I can see two problemw with this:

  1) Accidentially flushing a cache that contains other useful data (e.g.,
 the production cache)
  2) The cost of cache flushing when there is no cache used during a test.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15142#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to