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

File-based disk persistence layer for super_cache. Supports custom codecs, SHA-256 integrity checks, and optional gzip compression.

Changelog #

All notable changes to super_cache_disk 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 across all public symbols.

0.4.0 #

Added #

  • DiskCache<K,V> — persistent file-per-entry cache:
    • Each entry stored as {keyHash}.dat (value bytes) + {keyHash}.meta (JSON sidecar with TTL and SHA-256 checksum).
    • SHA-256 integrity verification on every read; corrupted entries are treated as a cache miss and deleted automatically.
    • Write-back buffer: put is non-blocking. The value is immediately readable from the in-memory buffer while the disk write is queued.
    • Sequential write queue via chained futures — writes are serialised and the queue is fully drained by dispose().
    • Optional gzip compression (compress: true).
    • FIFO eviction when maxEntries (default 500) is exceeded.
    • Background TTL sweep timer (configurable sweepInterval).
    • initialize() scans the cache directory for existing entries so previously persisted data is available across app restarts.
  • JsonCacheCodec<V> — serialises V via JSON (Map<String, dynamic> round-trip through fromJson/toJson functions).
  • StringCacheCodec — UTF-8 codec for plain String values.
1
likes
150
points
102
downloads

Publisher

verified publisherjihedmrouki.com

Weekly Downloads

File-based disk persistence layer for super_cache. Supports custom codecs, SHA-256 integrity checks, and optional gzip compression.

Repository (GitHub)
View/report issues

Topics

#cache #caching #storage #disk #persistence

Documentation

API reference

License

MIT (license)

Dependencies

hashlib, super_cache

More

Packages that depend on super_cache_disk