[feature] Added a new argument lock_factory to the DBMBackend implementation. This allows for drop-in replacement of the default FileLock backend, which builds on os.flock() and only supports Unix platforms. A new abstract base AbstractFileLock has been added to provide a common base for custom lock implementations. The documentation points to an example thread-based rw lock which is now tested on Windows.(link)
References: #44
[feature] The CacheRegion.invalidate() method now supports an option hard=True|False. A “hard” invalidation, equivalent to the existing functionality of CacheRegion.invalidate(), means CacheRegion.get_or_create() will not return the “old” value at all, forcing all getters to regenerate or wait for a regeneration. “soft” invalidation means that getters can continue to return the old value until a new one is generated.(link)
References: #38
[feature] New dogpile-specific exception classes have been added, so that issues like “region already configured”, “region unconfigured”, raise dogpile-specific exceptions. Other exception classes have been made more specific. Also added new accessor CacheRegion.is_configured. Pullreq courtesy Morgan Fainberg.(link)
References: #40
[bug] Erroneously missed when the same change was made for set() in 0.5.0, the Redis backend now uses pickle.HIGHEST_PROTOCOL for the set_multi() method as well when producing pickles. Courtesy Łukasz Fidosz.(link)
[bug] [redis] [py3k] Fixed an errant u'' causing incompatibility in Python3.2 in the Redis backend, courtesy Jimmey Mabey.(link)
References: #39
[bug] The util.coerce_string_conf() method now correctly coerces negative integers and those with a leading + sign. This previously prevented configuring a CacheRegion with an expiration_time of '-1'. Courtesy David Beitey.(link)
[bug] The refresh() method on CacheRegion.cache_multi_on_arguments() now supports the asdict flag.(link)
[feature] Now using the Lock included with the Python redis backend, which adds lock_timeout and lock_sleep arguments to the RedisBackend.(link)
[feature] Added new methods CacheRegion.get_or_create_multi() and CacheRegion.cache_multi_on_arguments(), which make use of the CacheRegion.get_multi() and similar functions to store and retrieve multiple keys at once while maintaining dogpile semantics for each.(link)
[feature] Added a method refresh() to functions decorated by CacheRegion.cache_on_arguments() and CacheRegion.cache_multi_on_arguments(), to complement invalidate() and set().(link)
References: #36
[feature] CacheRegion.configure() accepts an optional datetime.timedelta object for the expiration_time argument as well as an integer, courtesy Jack Lutz.(link)
References: #13
[feature] The expiration_time argument passed to CacheRegion.cache_on_arguments() may be a callable, to return a dynamic timeout value. Courtesy David Beitey.(link)
References: #20
[feature] Added support for simple augmentation of existing backends using the ProxyBackend class. Thanks to Tim Hanus for the great effort with development, testing, and documentation.(link)
References: #26
[feature] Full support for multivalue get/set/delete added, using CacheRegion.get_multi(), CacheRegion.set_multi(), CacheRegion.delete_multi(), courtesy Marcos Araujo Sobrinho.(link)
References: pull request 14
[bug] The Redis backend now uses pickle.HIGHEST_PROTOCOL when producing pickles. Courtesy Lx Yu.(link)
[bug] CacheRegion.cache_on_arguments() now has a new argument to_str, defaults to str(). Can be replaced with unicode() or other functions to support caching of functions that accept non-unicode arguments. Initial patch courtesy Lx Yu.(link)
[bug] Fixed bug where the “name” parameter for CacheRegion was ignored entirely. Courtesy Wichert Akkerman.(link)
References: #27
[feature] CacheRegion.get_or_create() and CacheRegion.cache_on_arguments() now accept a new argument should_cache_fn, receives the value returned by the “creator” and then returns True or False, where True means “cache plus return”, False means “return the value but don’t cache it.”(link)
References: pull request 13
[bug] Added support for the cache_timeout Mako argument to the Mako plugin, which will pass the value to the expiration_time argument of CacheRegion.get_or_create().(link)
[feature] An “async creator” function can be specified to CacheRegion which allows the “creation” function to be called asynchronously or be subsituted for another asynchronous creation scheme. Courtesy Ralph Bean.(link)
References: pull request 10
[feature] The function decorated by CacheRegion.cache_on_arguments() now includes a set() method, in addition to the existing invalidate() method. Like invalidate(), it accepts a set of function arguments, but additionally accepts as the first positional argument a new value to place in the cache, to take the place of that key. Courtesy Antoine Bertin.(link)
References: pull request 9
[feature] Redis backend now accepts optional “url” argument, will be passed to the new StrictRedis.from_url() method to determine connection info. Courtesy Jon Rosebaugh.(link)
[feature] Redis backend now accepts optional “password” argument. Courtesy Jon Rosebaugh.(link)
[feature] DBM backend has “fallback” when calling dbm.get() to instead use dictionary access + KeyError, in the case that the “gdbm” backend is used which does not include .get(). Courtesy Jon Rosebaugh.(link)
[bug] Fixed bug in DBM backend whereby if an error occurred during the “write” operation, the file lock, if enabled, would not be released, thereby deadlocking the app.(link)
References: #15
[bug] The util.function_key_generator() used by the function decorator no longer coerces non-unicode arguments into a Python unicode object on Python 2.x; this causes failures on backends such as DBM which on Python 2.x apparently require bytestrings. The key_mangler is still needed if actual unicode arguments are being used by the decorated function, however.(link)
References: #12
[bug] Using dogpile.core 0.4.0 now, fixes a critical bug whereby dogpile pileup could occur on first value get across multiple processes, due to reliance upon a non-shared creation time. This is a dogpile.core issue.(link)
References: #1
[bug] Fixed missing __future__ with_statement directive in region.py.(link)
[feature] get() method now checks expiration time by default. Use ignore_expiration=True to bypass this.(link)
[feature] Added new invalidate() method. Sets the current timestamp as a minimum value that all retrieved values must be created after. Is honored by the get_or_create() and get() methods.(link)
References: #7
support “min_compress_len” and “memcached_expire_time” with python-memcached backend. Tests courtesy Justin Azoff(link)
References: #3
Add support for coercion of string config values to Python objects - ints, “false”, “true”, “None”.(link)
References: #4
Added support to DBM file lock to allow reentrant access per key within a single thread, so that even though the DBM backend locks for the whole file, a creation function that calls upon a different key in the cache can still proceed.(link)
References: #5
Fixed DBM glitch where multiple readers could be serialized.(link)
Adjust bmemcached backend to work with newly-repaired bmemcached calling API (see bmemcached ef206ed4473fec3b639e).(link)
Based on dogpile.core now, to get the package namespace thing worked out.(link)