#15149: Memcached backend: possible issue with cache keys
----------------------------------------------+-----------------------------
               Reporter:  jeff@…              |         Owner:  nobody   
                 Status:  new                 |     Milestone:           
              Component:  Cache system        |       Version:  SVN      
             Resolution:                      |      Keywords:  memcached
           Triage Stage:  Unreviewed          |     Has patch:  0        
    Needs documentation:  0                   |   Needs tests:  0        
Patch needs improvement:  0                   |  
----------------------------------------------+-----------------------------

Comment (by russellm):

 @Jeff -- Two more checks:

  * Can you reproduce this problem in a clean project, or just inside the
 lendle/barstar projects? I'm wondering if there might be something in your
 code that is gumming up the works. For example, I can reproduce your
 results if I do the following:
 {{{
 from django.core import cache
 cache.set = cache._cache.set
 }}}
 I can't think of any reason that your code would actually be doing this
 (or anything like it), but that's the only way that I can reproduce the
 results you've reported (i.e., no prefix on cache key, debug prints not
 being shown, manually instantiated caches work correctly). If we can
 confirm that you are also seeing this problem in a vanilla project, then
 we can narrow down the search from "something fundamentally wrong with
 caching" to "something in your usage of caching that indicates a subtle
 backwards compatibility problem".
  * Do the cache tests in Django's test suite pass? To test this out,
 create a dummy settings file in the Django test directory (the same
 directory as runtests.py, not the django.tests package), and include a
 memcache setting:
 {{{
 DATABASES = {
     'default': {
         'ENGINE': 'django.db.backends.sqlite3'
     },
     'other': {
         'ENGINE': 'django.db.backends.sqlite3',
     }
 }

 CACHES = {
   'default': {
     'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
     'LOCATION': '127.0.0.1:11211',
     'KEY_PREFIX': 'lendle_',
   }
 }
 }}}
 then run {{{./runtests.py --settings=jeff cache}}} (where 'jeff.py' is the
 name of your settings module). If you're correctly configured, this should
 run 175 tests, with no skips or failures. If Memcache isn't configured at
 all, you'll see 32 skipped tests. If there is something wrong with
 memcache, you'll see 32 errors/failures.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15149#comment:12>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to