[patch] In memory file cache
|Reported by:||nesh <nesh [at] studioquattro [dot] co [dot] yu>||Owned by:||jacob|
|Component:||Core (Cache system)||Version:|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Attached to this ticket is a implementation of in memory based file cache. I got basic idea from vampire TemplateCache and re-implemented it to make more general.
Usage is simple, if you want to cache a file just call cache = get_cache('<cache name>') and then file_contents = cache.load('filename') . It will detect if the file is modified since last access and reload file.
I'm currently using it for caching translation objects for Ticket #65.
Change History (4)
Changed 10 years ago by nesh <nesh [at] studioquattro [dot] co [dot] yu>
comment:2 Changed 10 years ago by adrian
- Component changed from Tools to Cache system
- Owner changed from adrian to jacob