Releases: awolverp/cachebox
Releases · awolverp/cachebox
Release v5.0.4
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
What's Changed
- Better support for Python 3.14
- Some improvements
Internal
- Bump rust dependencies
- Use Rust nightly
- Use
parking_lot::Mutexinstead of duplicating its code ( by @chirizxc )
Thanks
- Thanks to @chirizxc
Full Changelog: v5.0.2...v5.0.3
Release v5.0.2
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
Changed
- The issue #25 fixed
- Type-hint improved
FIFOCache.getdocstring fixed
Thanks to
- @Techcable for the issue
Release v5.0.0
Notable changes are listed:
Added
- A new method named
random_keyadded toRRCache. - A new method named
expireadded toTTLCache. - Some new methods added to
VTTLCache:expire,items_with_expire. TTLCachenow supportstimedeltaas ttl.VTTLCachenow supportstimedeltaanddatetimeas ttl.- A new method
copyadded 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.cachememoryrenamed toCacheInfo.memory.
Removed
- The
nparameter of theLRUCache.least_recently_usedmethod has been removed.
For more info, see changelog
Release v4.5.3
Release v4.5.2
Fix for clear_cache in decorators
Changes
In previous version, clear_cache, does not clear the exceptions dictionary.
Thanks To
- @dada-engineer for the fix (#22)
Release v4.5.1
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
- @AlePiccin for the issue #20
Release v4.5.0
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
- @Benoss for the report
- @AlePiccin for the report and solution.
Release v4.4.2
No important changes were made to the library.
Updated
Pyo3 dependency updated and Box layout removed from Rust code.