Skip to content

Releases: toloco/warp_cache

0.2.1

20 Feb 12:47
28d6d8c

Choose a tag to compare

Change log:

  • Add support to Python 3.9

0.2.0

17 Feb 20:41
8888a80

Choose a tag to compare

Bug Fixes

  • Fix cross-process hashing for string/bytes keys (CRITICAL): The shared
    memory backend previously computed key hashes from Python's hash(), which is
    randomized per process (PYTHONHASHSEED) for str and bytes types. This
    caused cross-process cache lookups to silently miss — breaking the core value
    proposition of the shared backend. Key hashes are now computed from the
    deterministic serialized bytes using ahash with fixed seeds.

  • Fix oversize early-exit check: The __call__ path in
    SharedCachedFunction compared key_bytes.len() against max_size (the
    maximum entry count), which almost never triggered. The check now correctly
    delegates to is_oversize() only.

Improvements

  • Document approximate eviction ordering: Added doc comments to the internal
    ACCESS_LOG_CAPACITY constant and a Note: block to the cache() decorator
    docstring explaining that eviction ordering (LRU, MRU, LFU) is approximate
    under sustained hit-only workloads due to batched ordering updates.

  • Add PEP 561 typing support: Added py.typed marker and
    _warp_cache_rs.pyi type stubs for CacheInfo, SharedCacheInfo,
    CachedFunction, and SharedCachedFunction. Type checkers (mypy, pyright)
    can now understand the Rust extension's API.

Tests

  • Add cross-process string key test: New
    test_cross_process_str_key_different_hashseed spawns a subprocess with an
    explicit PYTHONHASHSEED=12345 to verify that string keys written by one
    process are correctly found by another — directly validating the hashing fix.

Other

  • Fix repository URL in pyproject.toml (tolotoloco).
  • Add ahash = "0.8" dependency (Unix targets only).

0.1.2

16 Feb 15:02

Choose a tag to compare

0.1.2