Commits

Anonymous committed a402387

Efficiency edits

  • Participants
  • Parent commits b886fc5

Comments (0)

Files changed (1)

File johnny/cache.py

             self.kh_class = keyhandler
         if keygen:
             self.kg_class = keygen
-        if not cache_backend and not hasattr(self, 'cache_backend'):
+        if not hasattr(self, 'cache_backend') and not cache_backend:
             cache_backend = settings._get_backend()
 
-        if not keygen and not hasattr(self, 'kg_class'):
+        if not hasattr(self, 'kg_class') and not keygen:
             self.kg_class = KeyGen
-        if keyhandler is None and not hasattr(self, 'kh_class'):
+        if not hasattr(self, 'kh_class') and keyhandler is None:
             self.kh_class = KeyHandler
 
         if cache_backend: