Aiocache

Latest version: v0.12.3

Safety actively analyzes 682334 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

1.0.0

==================

Migration instructions
++++++++++++++++++++++

There are a number of backwards-incompatible changes. These points should help with migrating from an older release:

* ``RedisBackend`` now expects a ``redis.Redis`` instance as an argument, instead of creating one internally from keyword arguments.
* The ``key_builder`` parameter for caches now expects a callback which accepts 2 strings and returns a string in all cache implementations, making the builders simpler and interchangeable.
* The ``key`` parameter has been removed from the ``cached`` decorator. The behaviour can be easily reimplemented with ``key_builder=lambda *a, **kw: "foo"``
* When using the ``key_builder`` parameter in ``multicached``, the function will now return the original, unmodified keys, only using the transformed keys in the cache (this has always been the documented behaviour, but not the implemented behaviour).
* ``BaseCache`` and ``BaseSerializer`` are now ``ABC``s, so cannot be instantiated directly.
* If subclassing ``BaseCache`` to implement a custom backend:

* The cache key type used by the backend must now be specified when inheriting (e.g. ``BaseCache[str]`` typically).
* The ``build_key()`` method must now be defined (this should generally involve calling ``self._str_build_key()`` as a helper).

0.12.0

===================

* Added ``async with`` support to ``BaseCache``.
* Added initial typing support.
* Migrated to ``redis`` library (``aioredis`` is no longer supported).
* ``SimpleMemoryBackend`` now has a cache per instance, rather than a global cache.
* Improved support for ``build_key(key, namespace)`` [569](https://github.com/aio-libs/aiocache/issues/569) -- Padraic Shafer
* Removed deprecated ``loop`` parameters.
* Removed deprecated ``cache`` parameter from ``create()``.
* Added support for keyword arguments in ``TimingPlugin`` methods.
* Fixed inconsistent enum keys between different Python versions. -- Padraic Shafer
* Fixed ``.clear()`` breaking when no keys are present.
* Fixed ``from aiocache import *``.
* Fixed ``.delete()`` when values are falsy.

0.11.1

===================

* Don't hardcode import redis and memcached in factory [461](https://github.com/argaen/aiocache/issues/461) - Manuel Miranda

0.11.0

===================

* Support str for timeout and ttl [454](https://github.com/argaen/aiocache/issues/454) - Manuel Miranda

* Add aiocache_wait_for_write decorator param [448](https://github.com/argaen/aiocache/issues/448) - Manuel Miranda

* Extend and improve usage of Cache class [446](https://github.com/argaen/aiocache/issues/446) - Manuel Miranda

* Add caches.add functionality [440](https://github.com/argaen/aiocache/issues/440) - Manuel Miranda

* Use raw msgpack attribute for loads [439](https://github.com/argaen/aiocache/issues/439) - Manuel Miranda

* Add docs regarding plugin timeouts and multicached [438](https://github.com/argaen/aiocache/issues/438) - Manuel Miranda

* Fix typehints in lock.py [434](https://github.com/argaen/aiocache/issues/434) - Aviv

* Use pytest_configure instead of pytest_namespace [436](https://github.com/argaen/aiocache/issues/436) - Manuel Miranda

* Add Cache class factory [430](https://github.com/argaen/aiocache/issues/430) - Manuel Miranda

0.10.1

===================

* Cancel the previous ttl timer if exists when setting a new value in the in-memory cache [424](https://github.com/argaen/aiocache/issues/424) - Minh Tu Le

* Add python 3.7 to CI, now its supported! [420](https://github.com/argaen/aiocache/issues/420) - Manuel Miranda

* Add function as parameter for key_builder [417](https://github.com/argaen/aiocache/issues/417) - Manuel Miranda

* Always use __name__ when getting logger [412](https://github.com/argaen/aiocache/issues/412) - Mansur Mamkin

* Format code with black [410](https://github.com/argaen/aiocache/issues/410) - Manuel Miranda

0.10.0

===================

* Cache can be disabled in decorated functions using `cache_read` and `cache_write` [404](https://github.com/argaen/aiocache/issues/404) - Josep Cugat

* Cache constructor can receive now default ttl [405](https://github.com/argaen/aiocache/issues/405) - Josep Cugat

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.