Commits

Tobias McNulty committed 7019c7d

clean up diff

  • Participants
  • Parent commits 8102ac2
  • Branches issue-55

Comments (0)

Files changed (3)

File docs/queryset_cache.rst

 * ``JOHNNY_MIDDLEWARE_SECONDS``
 * ``MAN_IN_BLACKLIST``
 
-
 .. highlight:: python
 
 ``CACHES .. JOHNNY_CACHE`` is the preferred way of designating a cache

File johnny/cache.py

         alias. Total length up to 212 (max for memcache is 250).
         """
         table = unicode(table)
-        db = settings.DB_CACHE_KEYS[db]
+        db = unicode(settings.DB_CACHE_KEYS[db])
         if len(table) > 100:
             table = table[0:68] + self.gen_key(table[68:])
         if db and len(db) > 100:

File johnny/settings.py

             getattr(settings, 'JOHNNY_TABLE_BLACKLIST', []))
 BLACKLIST = set(BLACKLIST)
 
-DB_CACHE_KEYS = dict((name, unicode(db.get('JOHNNY_CACHE_KEY', name)))
+DB_CACHE_KEYS = dict((name, db.get('JOHNNY_CACHE_KEY', name))
                      for name, db in settings.DATABASES.iteritems())
 
 MIDDLEWARE_KEY_PREFIX = getattr(settings, 'JOHNNY_MIDDLEWARE_KEY_PREFIX', 'jc')