3 ms·
Thanks. Note that you'll always want a way to resync the redis copy of the data with what's in your database. Why is that? Isn't Redis persistent?
by stephth 15y ago
Thanks.
Note that you'll always want a way to resync the redis copy of the data with what's in your database.
Why is that? Isn't Redis persistent?
- tednaleid 15y agoYes, you can tell it to either make a copy to disk ever N seconds or use an AOF mechanism, but that doesn't mean it's in sync with your database. Depending on how your DB can get updated, you'll want to think about how the cache can get stale and whether you're expiring data in redis periodically, or removing keys/using different hashes for keys. The specific way to do this will depend on the app that you're using.