epicweb-dev / cachified

🤑 wrap virtually everything that can store by key to act as cache with ttl/max-age, stale-while-validate, parallel fetch protection and type-safety support

Repository from Github https://github.comepicweb-dev/cachifiedRepository from Github https://github.comepicweb-dev/cachified

swv? Shouldn't it be swr?

kentcdodds opened this issue · comments

I noticed the metadata has staleWhileRevalidate shortened to swv. Shouldn't that be swr?

oh, you're right. Will fix this in a backwards-compatible way within the next days.

Actually, the fix is a breaking change for everyone working with CacheMetadata for example by maintaining a custom Cache implementation (such as your "SQLite cache").

But the change is implemented so that existing cache entries with swv continue to work, and only new writes use swr

Fixed in 3.0.0

Great! Thank you :)