Mike Bayer avatar Mike Bayer committed 0f49383

- make the created_time and version keys small

Comments (0)

Files changed (1)

dogpile/cache/region.py

         def get_value():
             value = self.backend.get(key)
             if value is NO_VALUE or \
-                value.metadata['version'] != value_version:
+                value.metadata['v'] != value_version:
                 raise NeedRegenerationException()
-            return value.payload, value.metadata["creation_time"]
+            return value.payload, value.metadata["ct"]
 
         def gen_value():
             value = self._value(creator())
             self.backend.set(key, value)
-            return value.payload, value.metadata["creation_time"]
+            return value.payload, value.metadata["ct"]
 
         dogpile = self.dogpile_registry.get(key, expiration_time)
         with dogpile.acquire(gen_value, 
     def _value(self, value):
         """Return a :class:`.CachedValue` given a value."""
         return CachedValue(value, {
-                            "creation_time":time.time(), 
-                            "version":value_version
+                            "ct":time.time(), 
+                            "v":value_version
                         })
 
     def set(self, key, value):
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.