Skip to content

Document key serialization behavior#28

Merged
toloco merged 2 commits intomasterfrom
docs-key-serialization
Apr 13, 2026
Merged

Document key serialization behavior#28
toloco merged 2 commits intomasterfrom
docs-key-serialization

Conversation

@toloco
Copy link
Copy Markdown
Owner

@toloco toloco commented Apr 13, 2026

Summary

  • Added "Key serialization behavior" section to docs/usage.md
  • Covers kwargs ordering (sorted for determinism), fast-path binary format, pickle fallback, and cross-process determinism guarantees
  • Fixed "pickle size" wording in size limits table to "serialized size"

Closes #11

Test plan

  • Documentation only — no code changes
  • Reviewed against actual Rust implementation for accuracy

🤖 Generated with Claude Code

toloco and others added 2 commits April 13, 2026 14:28
Add CachedCallable[P, R] protocol that preserves the original function's
call signature while exposing cache_info() and cache_clear(). Add
BaseCacheInfo protocol for the common cache info interface.

- cache() now returns Callable[[Callable[P, R]], CachedCallable[P, R]]
- Add _probe to _warp_cache_rs.pyi stub (removes type:ignore comments)
- Export BaseCacheInfo and CachedCallable from warp_cache
- Add typing_extensions dependency for Python 3.9

Closes #10

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add dedicated section to usage.md covering:
- How cache keys are formed from *args/**kwargs (sorted kwargs)
- Memory backend: Python objects, hash(), single-process
- Shared backend: fast-path binary format for primitives, pickle fallback
- Cross-process determinism: fixed-seed ahash, immune to PYTHONHASHSEED

Closes #11

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@toloco toloco merged commit 43ecf59 into master Apr 13, 2026
15 checks passed
@toloco toloco deleted the docs-key-serialization branch April 13, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: key serialization behavior

1 participant