Repository navigation
v0.4.0
Stronger invalidation during loading
Delete, Clear, and successful writes now prevent outstanding loaders from putting obsolete data back into the cache. New callers do not join invalidated loads; callers already waiting still receive their loader result.
The guarantee follows the storage key across typed views and parent-cache operations. Successful loader publications also supersede competing outstanding loads. Rejected writes leave loads unchanged. Tracking exists only for active loads.
Public API signatures are unchanged. This release changes late-publication behaviour: a cancelled loader that ignores cancellation can still warm the cache only if no invalidation or successful write has superseded it. Clear remains shard-by-shard, and Close only stops maintenance goroutines.
The README and API documentation describe ordering and migration implications. Regression tests cover positive and negative results, absent-key deletion, clearing, replacements, rejected writes, competing loads, and unrelated keys.
Install:
go get github.com/andared/sanecache@v0.4.0