Repository navigation
Issue #42 : [decorators] @cache never evicts; @rate_limit is process-global and raises bare ValueError - #47
Conversation
…ase PR. Keep pyproject.toml and uv.lock in sync, skip a bump while a version is still unpublished, and only hit the PyPI environment when an upload will actually run.
Bring the bump/publish workflows in line with develop (via main) so the PR can merge.
…ure/release-automation Automate version bumps and PyPI publishes from main
…ase/0.4.0 Release version bump to 0.4.0
|
The solution adds an LRU‑bounded cache with a default size of 1024 and a |
Verification of the proposed fix (
|
This PR enhances the decorator utilities in
nitrostack/core/additional_decorators.pyto make caching and rate limiting safer and more predictable.Changes
@cachemax_sizeparameter (default 1024,Nonedisables cap).cache_clear()for tests.@rate_limitRateLimitExceededError(subclass ofValueError) carryingretry_after_seconds.key=callable for per-user or per-resource counters.RateLimitExceededErrortonitrostack/core/errors.pyand exported in__init__.py.tests/test_decorators_limits.pycovers eviction, expiry, unbounded mode, cache_clear, typed error, retry_after_seconds, per-key limits, and shared default behavior.Verification
httpxdependency).Impact