Commits

Jeremy Self committed 6cdb664

Issue #54 - replace 0's with settings.MIDDLEWARE_SECONDS

Comments (0)

Files changed (1)

         #if local.get('in_test', None): print str(val).ljust(32), key
         if val == None:
             val = self.keygen.random_generator()
-            self.cache_backend.set(key, val, 0, db)
+            self.cache_backend.set(key, val, settings.MIDDLEWARE_SECONDS, db)
         return val
 
     def get_multi_generation(self, tables, db='default'):
         #if local.get('in_test', None): print str(val).ljust(32), key
         if val == None:
             val = self.keygen.random_generator()
-            self.cache_backend.set(key, val, 0, db)
+            self.cache_backend.set(key, val, settings.MIDDLEWARE_SECONDS, db)
         return val
 
     def invalidate_table(self, table, db='default'):
         containing the table)"""
         key = self.keygen.gen_table_key(table, db)
         val = self.keygen.random_generator()
-        self.cache_backend.set(key, val, 0, db)
+        self.cache_backend.set(key, val, settings.MIDDLEWARE_SECONDS, db)
         return val
 
     def sql_key(self, generation, sql, params, order, result_type,
                 #todo - create a smart iterable wrapper
                 val = list(val)
             if key is not None:
-                self.cache_backend.set(key, val, 0, db)
+                self.cache_backend.set(key, val, settings.MIDDLEWARE_SECONDS, db)
             return val
         return newfun
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.