objcache.models package¶
Submodules¶
objcache.models.object_cache module¶
-
class
objcache.models.object_cache.
ObjectCache
(db_path, cache_path)[source]¶ Bases:
object
Store Python objects on the filesystem and load them later. Built on top of ZoDB but provides an easier to use interface.
- Examples
>>> from objcache import ObjectCache >>> cache = ObjectCache('cache.zodb', ('a', 'b')) >>> cache.store(5) >>> # Later session >>> cache = ObjectCache('cache.zodb', ('a', 'b')) >>> result = cache.get() >>> print(result) 5
-
__init__
(db_path, cache_path)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
property
db
¶
-
property
db_root
¶