Publisher review:Thread-safe caching object and HTTP implementation script shows you the implementation of an abstract, thread-safe cache with minimal locking. This script shows you the implementation of an abstract, thread-safe cache with minimal locking.
It presents four concrete implementations : a validating file cache, a validating HTTP cache, an experimental Python module cache and a function cache. Plus, an abstract cache with weak references to its values.
This script provides you with an abstract Cache class, from which you can inherit, overriding the check() and build() methods, and four specialisations.
FileCache and HTTPCache are quite what their name describe. ModuleCache is an experimental specialisation of FileCache, which can come handy when playing with dynamic code, since it allow you to load any arbitrary file as a python module, and dynamically reload it each time the file is modified.
Thread-safety of the cache is a must, since the purpose of a cache is to be shared a used by as much code as possible... A multi-threaded application such as a web application server has a strong need for thread-safe cache and pool structures.
Thread-safe caching object and HTTP implementation is a Python script for Programming Methods and Algorithms scripts design by Nicolas Lehuen.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
shows you the implementation of an abstract, thread-safe cache with minimal locking.
Operating system:Windows / Linux / Mac OS / BSD / Solaris