Skip to content

Releases: awolverp/cachebox

Release v5.0.4

20 Oct 16:48

Choose a tag to compare

What's Changed

  • Rewrite build workflow to support Python 3.13t, 3.14 and 3.14t on all platforms (#34; thanks to @chirizxc)

Internal

  • Bump dependencies

Full Changelog: v5.0.3...v5.0.4

Release v5.0.3

11 Oct 13:02

Choose a tag to compare

What's Changed

  • Better support for Python 3.14
  • Some improvements

Internal

  • Bump rust dependencies
  • Use Rust nightly
  • Use parking_lot::Mutex instead of duplicating its code ( by @chirizxc )

Thanks

Full Changelog: v5.0.2...v5.0.3

Release v5.0.2

14 Sep 09:31

Choose a tag to compare

What's Changed

  • Support python 3.14 by @chirizxc in #27
  • Support python 3.13t
  • Bump dependencies
  • drop support python 3.8

Special Thanks To

Full Changelog: v5.0.1...v5.0.2

Release v5.0.1

25 Apr 08:49

Choose a tag to compare

Changed

  • The issue #25 fixed
  • Type-hint improved
  • FIFOCache.get docstring fixed

Thanks to

Release v5.0.0

18 Apr 14:39
f6a6f47

Choose a tag to compare

Notable changes are listed:

Added

  • A new method named random_key added to RRCache.
  • A new method named expire added to TTLCache.
  • Some new methods added to VTTLCache: expire, items_with_expire.
  • TTLCache now supports timedelta as ttl.
  • VTTLCache now supports timedelta and datetime as ttl.
  • A new method copy added to all caches.

Changed

  • Now the errors which occurred while doing __eq__ operations will not be ignored:
class A:
    def __hash__(self):
        return 1
    def __eq__(self, other):
        raise NotImplementedError("not implemeneted")

cache = cachebox.FIFOCache(0, {A(): 10})

cache[A()]
# Traceback (most recent call last):
# File "script.py", line 11, in <module>
#    cache[A()]
#    ~~~~~^^^^^
#  File "script.py", line 7, in __eq__
#   raise NotImplementedError("not implemeneted")
# NotImplementedError: not implemeneted
  • __repr__ methods refactored:
cachebox.LRUCache(100, {i:i for i in range(100)})
# cachebox._cachebox.LRUCache[100/100]({0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10, 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 24: 24, 25: 25, 26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 31: 31, 32: 32, 33: 33, 34: 34, 35: 35, 36: 36, 37: 37, 38: 38, 39: 39, 40: 40, 41: 41, 42: 42, 43: 43, 44: 44, 45: 45, 46: 46, 47: 47, 48: 48, 49: 49, 50: 50, ... 49 more ...})
  • The CacheInfo.cachememory renamed to CacheInfo.memory.

Removed

  • The n parameter of the LRUCache.least_recently_used method has been removed.

For more info, see changelog

Release v4.5.3

31 Mar 11:52

Choose a tag to compare

Changed

  • The cached and cachedmethods decorators cached the exceptions regardless of the number of waiters. This issue has now been resolved.

Thanks to

Release v4.5.2

14 Mar 13:39

Choose a tag to compare

Fix for clear_cache in decorators

Changes

In previous version, clear_cache, does not clear the exceptions dictionary.

Thanks To

Release v4.5.1

01 Feb 09:46

Choose a tag to compare

A small fix for version v4.5.0.

Changes

In previous version, the cached and cachedmethod functions caught a KeyError from the callback function, which led to the cached function being called again.

Thanks to

Release v4.5.0

31 Jan 11:44

Choose a tag to compare

cached and cachedmethod improved

Now cachebox uses threading.Lock for sync functions, and asyncio.Lock for async functions to avoid cache stampede. These changes fix #15 and #20 issues.

Thanks to

Release v4.4.2

18 Jan 15:24

Choose a tag to compare

No important changes were made to the library.

Updated

Pyo3 dependency updated and Box layout removed from Rust code.