Release v6.2.2
Fixed several bugs related to miss counting, missing await, lock cleanup on exceptions, and cancellation handling.
Bug fixes
-
@cachedbugs:- With
lock=False, misses were never incremented and hits were double-counted. Now they are counted correctly. - In the async wrapper, when
cachebox__ignore=Trueand lock was off, the function was not awaited and a coroutine object was returned. Now it is properly awaited. - If the cached function raised an exception, the per-key lock was never removed and stayed in memory. It is now cleaned up properly.
- If a task was cancelled while waiting for the lock, the waiter count stayed high and the lock was never cleaned up. Now it is decremented with try/finally.
- All exceptions (even
BaseException) now go through the same cleanup path (previously onlyExceptions was caught).
- With
-
In
Frozenclass, the check for the underlying cache no longer relies onassert(so it still works with-Oflag). -
Removed an unreachable branch in
make_keyfunction.
Full Changelog: v6.2.1...v6.2.2