Changelog

0.6.3

no release date

feature

0.6.2

Released: Tue Aug 16 2016

feature

  • [feature] Added a new system to allow custom plugins specific to the issue of “invalidate the entire region”, using a new base class RegionInvalidationStrategy. As there are many potential strategies to this (special backend function, storing special keys, etc.) the mechanism for both soft and hard invalidation is now customizable. New approaches to region invalidation can be contributed as documented recipes. Pull request courtesy Alexander Makarov.

    References: #38

  • [feature] Added a new cache key generator kwarg_function_key_generator(), which takes keyword arguments as well as positional arguments into account when forming the cache key.

    References: #43

bug

  • [bug] Restored some more util symbols that users may have been relying upon (although these were not necessarily intended as user-facing): dogpile.cache.util.coerce_string_conf, dogpile.cache.util.KeyReentrantMutex, dogpile.cache.util.memoized_property, dogpile.cache.util.PluginLoader, dogpile.cache.util.to_list.

0.6.1

Released: Mon Jun 6 2016

bug

  • [bug] Fixed imports for dogpile.core restoring ReadWriteMutex and NameRegistry into the base namespace, in addition to dogpile.core.nameregistry and dogpile.core.readwrite_lock.

    References: #99

0.6.0

Released: Mon Jun 6 2016

feature

  • [feature] The dogpile.core library has been rolled in as part of the dogpile.cache distribution. The configuration of the dogpile name as a namespace package is also removed from dogpile.cache. In order to allow existing installations of dogpile.core as a separate package to remain unaffected, the .core package has been retired within dogpile.cache directly; the Lock class is now available directly as dogpile.Lock and the additional dogpile.core constructs are under the dogpile.util namespace.

    Additionally, the long-deprecated dogpile.core.Dogpile and dogpile.core.SyncReaderDogpile classes have been removed.

    References: #91

bug

  • [bug] The Redis backend now creates a copy of the “arguments” dictionary passed to it, before popping values out of it. This prevents the given dictionary from losing its keys.

  • [bug] Fixed bug in “null” backend where NullLock did not accept a flag for the NullLock.acquire() method, nor did it return a boolean value for “success”.

    References: #97

0.5.7

Released: Mon Oct 19 2015

feature

bug

  • [bug] [redis] Repaired the CacheRegion.get_multi() method when used with a list of zero length against the redis backend.

    References: #74

0.5.6

Released: Mon Feb 2 2015

feature

  • [feature] Changed the pickle protocol for the file/DBM backend to pickle.HIGHEST_PROTOCOL when producing new pickles, to match that of the redis and memorypickle backends. Pull request courtesy anentropic.

    References: pull request 30

0.5.5

Released: Wed Jan 21 2015

feature

bug

0.5.4

Released: Sat Jun 14 2014

feature

bug

  • [bug] Added missing Mako test dependency to setup.py. Pull request courtesy Wichert Akkerman.

    References: pull request 19

  • [bug] Fixed bug where calling CacheRegion.get_multi() or CacheRegion.set_multi() with an empty list would cause failures based on backend. Pull request courtesy Wichert Akkerman.

    References: #58, pull request 20

  • [bug] Repaired the entry point for Mako templates; the name of the entrypoint itself was wrong vs. what was in the docs, but beyond that the entrypoint would load the wrong module name. Pull request courtesy zoomorph.

    References: pull request 15

  • [bug] The coerce_string_conf() function, which is used by Region.configure_from_config(), will now recognize floating point values when parsing conf strings and deliver them as such; this supports non-integer values such as Redis lock_sleep. Pullreq courtesy Jeff Dairiki.

    References: #57, pull request 13

0.5.3

Released: Wed Jan 8 2014

feature

bug

  • [bug] Fixed bug where the key_mangler would get in the way of usage of the async_creation_runner feature within the Region.get_or_create() method, by sending in the mangled key instead of the original key. The “mangled” key is only supposed to be exposed within the backend storage, not the creation function which sends the key back into the Region.set(), which does the mangling itself. Pull request courtesy Ryan Kolak.

    References: pull request 10

  • [bug] [py3k] Fixed bug where the Region.get_multi() method wasn’t calling the backend correctly in Py3K (e.g. was passing a destructive map() object) which would cause this method to fail on the memcached backend.

  • [bug] Fixed a format call in the redis backend which would otherwise fail on Python 2.6; courtesy Jeff Dairiki.

    References: pull request 9

0.5.2

Released: Fri Nov 15 2013

feature

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

    References: #44

bug

  • [bug] Fixes to routines on Windows, including that default unit tests pass, and an adjustment to the “soft expiration” feature to ensure the expiration works given windows time.time() behavior.

  • [bug] Added py2.6 compatibility for unsupported total_seconds() call in region.py

0.5.1

Released: Thu Oct 10 2013

feature

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

    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.

    References: #40

bug

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

  • [bug] [redis] [py3k] Fixed an errant u'' causing incompatibility in Python3.2 in the Redis backend, courtesy Jimmey Mabey.

    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.

  • [bug] The refresh() method on CacheRegion.cache_multi_on_arguments() now supports the asdict flag.

0.5.0

Released: Fri Jun 21 2013

feature

bug

  • [bug] The Redis backend now uses pickle.HIGHEST_PROTOCOL when producing pickles. Courtesy Lx Yu.

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

  • [bug] Fixed bug where the “name” parameter for CacheRegion was ignored entirely. Courtesy Wichert Akkerman.

    References: #27

misc

  • [misc] Source repository has been moved to git.

0.4.3

Released: Thu Apr 4 2013

feature

bug

  • [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().

0.4.2

Released: Sat Jan 19 2013

feature

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

    References: pull request 10

0.4.1

Released: Sat Dec 15 2012

feature

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

    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.

  • [feature] Redis backend now accepts optional “password” argument. Courtesy Jon Rosebaugh.

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

bug

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

    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.

    References: #12

0.4.0

Released: Tue Oct 30 2012

bug

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

    References: #1

  • [bug] Fixed missing __future__ with_statement directive in region.py.

0.3.1

Released: Tue Sep 25 2012

bug

  • [bug] Fixed the mako_cache plugin which was not yet covered, and wasn’t implementing the mako plugin API correctly; fixed docs as well. Courtesy Ben Hayden.

  • [bug] Fixed setup so that the tests/* directory isn’t yanked into the install. Courtesy Ben Hayden.

0.3.0

Released: Thu Jun 14 2012

feature

  • [feature] get() method now checks expiration time by default. Use ignore_expiration=True to bypass this.

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

    References: #7

bug

  • [bug] Fixed bug whereby region.get() didn’t work if the value wasn’t present.

    References: #8

0.2.4

no release date
  • Fixed py3k issue with config string coerce, courtesy Alexander Fedorov

0.2.3

Released: Wed May 16 2012
  • support “min_compress_len” and “memcached_expire_time” with python-memcached backend. Tests courtesy Justin Azoff

    References: #3

  • Add support for coercion of string config values to Python objects - ints, “false”, “true”, “None”.

    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.

    References: #5

  • Fixed DBM glitch where multiple readers could be serialized.

  • Adjust bmemcached backend to work with newly-repaired bmemcached calling API (see bmemcached ef206ed4473fec3b639e).

0.2.2

Released: Thu Apr 19 2012
  • add Redis backend, courtesy Ollie Rutherfurd

0.2.1

Released: Sun Apr 15 2012
  • move tests into tests/cache namespace

  • py3k compatibility is in-place now, no 2to3 needed.

0.2.0

Released: Sat Apr 14 2012
  • Based on dogpile.core now, to get the package namespace thing worked out.

0.1.1

Released: Tue Apr 10 2012
  • Fixed the configure_from_config() method of region and backend which wasn’t working. Courtesy Christian Klinger.

0.1.0

Released: Sun Apr 08 2012
  • Initial release.

  • Includes a pylibmc backend and a plain dictionary backend.