[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.