{"repo":"unkn0wn-root/cascache","free":true,"listed":false,"github":"https://github.com/unkn0wn-root/cascache","clone":"git clone https://github.com/unkn0wn-root/cascache.git","description":"Fence-based CAS for Go with read-time validation, validated batch entries, pluggable providers/codecs and shared version state.","language":"Go","stars":68,"topics":["bigcache","cache","caching","go","golang","redis","ristretto"],"license":null,"category":"databases-storage","readme_excerpt":"CasCache TL;DR If you run multiple pods, replicas, or services that share a cache and you need to make sure a cached key always reflects the latest known state and not something a slow writer quietly overwrote three seconds ago - CasCache is built for that. It will not serve stale data and it will not let a late write silently win or override. When it cannot prove a value is current, it treats the entry as a miss instead of serving something outdated. --- Most caches treat writes as unconditional: you SET a value and it sticks until someone deletes it or it expires. That works fine until two requests overlap. 1. request A reads a user record from the database 2. while A is still working, request B updates that same record and invalidates the cache 3. request A finishes and writes the now-outdated record back into the cache The cache now holds stale data and nobody knows. A DEL followed by a SET does not prevent this because nothing ties the SET back to the state that existed when the read started. CasCache fixes this by remembering what version of a key you saw before you started your work. When you try to write, it checks whether that version is still current. If something changed in between, the write is rejected. On reads, it checks again - a cached value is only served if it still matches the latest known version. If anything is off, the cache treats it as a miss. Index - Performance - Single-key Redis operations - Batch operations - 50,000 req/s target - Why - How it wor","default_branch":null,"files":null,"tree":[],"storefront":"/r/unkn0wn-root","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/unkn0wn-root/cascache/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}