This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).
Change-Id: I6992567be5c078ec1163a7a95e8148a30b57c8f8
A new exception class :class:`.exception.PluginNotFound` is now
raised when a particular cache plugin class cannot be located
either as a setuptools entrypoint or as a registered backend.
Previously, a plain ``Exception`` was thrown. Pull request
courtesy Jamie Lennox.
Change-Id: Iceab2d613d2d802618dc0bed8ec2db694176c788
The :attr:`.api.NO_VALUE` constant now has a fixed ``__repr__()``
output, so that scenarios where this constant's string value
ends up being used as a cache key do not create multiple values.
Pull request courtesy Paul Brown.
Change-Id: Iecc9633d6be562bc6821bf4ee2ff3f29d1b31e80
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/61
If `Region.get_or_create_multi` is used with a `should_cache`
function and no value of the current set should be cached,
do not try to store the empty dict in the backend. It's
unnecessary and also breaks on some backends such as Redis.
Change-Id: Ib7a48d0d7b2f6569e09008f4603f8a355bf9396a
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/58
The only place we test "connect to backend" for memcached/redis is
in _check_backend_available. If the pifpaf environment variable
is set, assume the memcached/redis service is running, and propagate
if connect fails in this case.
Change-Id: I861b8bf028300e968e4f571a9f0aa31a2f35e8fa
When `_user_defined_key_mangler` is not set, after calling `configure()` method on a region instance, it will be reset to `backend`'s default, which is `None`. So during the tests, the `_store_keys()` mangler function will never be called.
Change-Id: I0da923d6f3ef5f4c6b8ef468898ad2ce8d02e717
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/54
Introduce class RegionInvalidationStrategy that performs region
invalidation. Add region_invalidator parameter
to CacheRegion.configure to pass custom invalidator object.
Fixes: #38
Change-Id: I62f5394e3916ed8debf9e23fcd18df4c4793f69c
Add in a key-word-arg cache key generator that may be optionally
used. This generator will generate a key that mirrors closely to
the original key generator. The key difference is that it will
flatten all arguments down to just the values ordered alphabetically
based on the argument name. This order will be used to ensure that
regardless of the order that the keys are passed (positional,
key-word, or out-of-order key-word) the cache key ends up being
the same.
This was not made the default keygenerator to avoid reverse
incompatibilities with developers that are relying on stable
cache-key generation (e.g. storing data via the memcache-like
interface to a non-volitile backend).
Fixes: #43
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: I86c9d5e9c611090d5a84d8a746486a0b6c80039a
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/46
and ``NameRegistry`` into the base namespace, in addition to
``dogpile.core.nameregistry`` and ``dogpile.core.readwrite_lock``.
fixes #99
- 0.6.1 release
Change-Id: I57c24fc6452e65fa99922547bede13d19582406a
The dogpile.core package itself is EOLed. The features
within it are now moved underneath the "dogpile"
and "dogpile.util" namespaces, and the namespace packaging
directives are removed. dogpile.cache has no
dependencies on "dogpile.core" as a namespace any longer,
though it does provide dogpile/core.py for backwards
compatibility.
fixes #91
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Change-Id: Ia1ca428616073755aec74c2ac4780cd634092ca8
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/48
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.
Change-Id: I17c5891cea82c2edaa09290ff974a261f909a811
(cherry picked from commit 4ca3e02f21338a3566697a84c12366b7b1950de5)
The interface for acquiring locks specifies that they should accept and
default to wait=True. NullLock wasn't implementing this correctly.
Additionally, the acquire() function needs to return a boolean value
to indicate that the lock was acquired (which in the case of NullLock
is unconditional).
Fixes: #97
Change-Id: I45487cd602b562242e425395728a9ed7e78d797e
Pull-request: https://bitbucket.org/zzzeek/dogpile.cache/pull-requests/50
This sets up a tox environment that conditionally runs tests
for either redis, memcached, or dbm, using pifpaf to install ad-hoc
redis and/or memcached servers on private ports. This will allow
concurrent test runs against separate memcached / redis instances.
Additionally, the tox environment is split out so that we can easily
use a jenkins matrix build for parallelism.
Change-Id: I56b98e2b2b023b4178d77203a07c72b8fa5dfd3d
Add a test for the original fn set when cache_on_arguments decorator is
used. This ensures the original fn is located at resulting
<decorated_func>.orignal