super_cache_testing 1.0.0 copy "super_cache_testing: ^1.0.0" to clipboard
super_cache_testing: ^1.0.0 copied to clipboard

Test utilities for super_cache. Provides FakeCache and ManualClock so consumers can write deterministic TTL and eviction tests.

Changelog #

All notable changes to super_cache_testing are documented here. Releases follow Semantic Versioning.


1.0.0 — 2024-01-01 #

Stable public release. API is frozen.

Changed #

  • Version aligned with the rest of the super_cache family.
  • Documentation improvements.

0.4.0 #

Added #

  • FakeCache<K,V> — synchronous in-memory Cache<K,V> implementation for unit tests. No eviction; all entries survive until explicitly removed or TTL elapses. Exposes gets, puts counters and a reset() helper.
  • ManualClock — injectable time source. Pass it to FakeCache and call advance(Duration) or setTime(DateTime) to control TTL expiration without Future.delayed. Makes TTL tests deterministic and instant.
1
likes
160
points
101
downloads

Publisher

verified publisherjihedmrouki.com

Weekly Downloads

Test utilities for super_cache. Provides FakeCache and ManualClock so consumers can write deterministic TTL and eviction tests.

Repository (GitHub)
View/report issues

Topics

#cache #testing #mock

Documentation

API reference

License

MIT (license)

Dependencies

super_cache

More

Packages that depend on super_cache_testing