Commit 9747a14
committed
Refactor & optimize
- Replaced `copy_level` parameter with more flexible `postprocess`
callable (defaults to `postprocess_copy_mutables`). Now supports None
(no copy), shallow copy, deep copy, or custom post-processing.
- Removed deprecated `cachedmethod` decorator (use cached(...,
cache=lambda self: self._cache) instead).
- `CacheInfo` namedtuple no longer includes the `memory` field.
- Default cache changed from `FIFOCache` to `LRUCache`.
- Fixed incorrect `is_method` handling.
- Improved per-key lock management: now uses a plain `dict` instead of
`defaultdict`, and removes the lock when no waiters remain (better
memory behavior under high contention).
- Improved key makers (`make_key`, `make_hash_key`, `make_typed_key`)utils
1 parent f205e6b commit 9747a14
3 files changed
Lines changed: 661 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments