Skip to content

Releases: umarbutler/persist-cache

v0.4.3

19 Jun 04:52
Compare
Choose a tag to compare

Fixed

  • Fixed a typo that caused the fix for #6 to not work and instead break flush().

v0.4.2

18 Jun 07:47
Compare
Choose a tag to compare

Fixed

  • Fixed a bug wherein flush() would try locking lock files (#6).
  • Fixed typo in the docstring for the test_persist_cache() unit test in test_persist_cache.py.

v0.4.1

10 Jun 04:29
Compare
Choose a tag to compare

Fixed

  • Fixed the formatting of the docstring of cache() because a portion of it was being rendered by Vscode as a single line instead of a bullet point list.

v0.4.0

06 May 11:10
Compare
Choose a tag to compare

Added

  • Added support for the caching of both synchronous and asynchronous generator functions.
  • Added delete(), clear() and flush() helper functions for deleting, clearing and flushing caches.

v0.3.2

06 May 11:18
Compare
Choose a tag to compare

Changed

  • Began hashing the names of caches with XXH3 to ensure caches may be assigned any arbitrary name, regardless of whether it is compatible with the local file system.

v0.3.1

20 Mar 11:48
Compare
Choose a tag to compare

Fixed

  • Fixed a bug causing cache() to raise a TypeError when attempting to cache a function call that contains an argument that is a list containing a dictionary (#4) (ec07874).

v0.3.0

19 Mar 06:20
Compare
Choose a tag to compare

Changed

  • Ceased delimiting hashes and the length of the input with hyphens as the hashes already have a fixed size so there is no possibility of collision.

v0.2.0

18 Mar 10:56
d412b8b
Compare
Choose a tag to compare

Added

  • Stale calls are now flushed when initialising a cache.

Changed

  • Switched hashing algorithm from XXH3 to XXH128 and began suffixing hashes with the length of their input to significantly reduce the already very low likelihood of hash collisions.
  • Pickle data is now compressed with LZ4 to speed up IO and reduce disk usage.

Removed

  • Removed unused import of asyncio in persist_cache.py.

v0.1.1

14 Mar 10:48
Compare
Choose a tag to compare

Added

  • Added a unit test for passing a custom name to cache().
  • Added unit tests for the caching of asynchronous functions and methods.
  • Added unit tests for the caching of synchronous methods.

Fixed

  • Fixed cache()'s inability to identify certain wrapped asynchronous functions and methods as being asynchronous (#1) (fe7aa6c).
  • Fixed cache()'s inability to cache function calls returning bytes, bytearray and memoryview objects (#2) (f763ce7).

v0.1.0

12 Mar 12:12
Compare
Choose a tag to compare

Added

  • Added the cache() decorator, which locally and persistently caches functions.