4 ms·
Are you using it as a LRU cache? I'd really like to use Redis for this -- are there any examples out there of how to do it / could you share how you've done it?
by robhu 16y ago
Are you using it as a LRU cache? I'd really like to use Redis for this -- are there any examples out there of how to do it / could you share how you've done it?
- weixiyen 16y agoset max-memory inside the config, it'll automatically do it for you as long as you are using expire on the keys. The implementation according to antirez is that they sample 3 random keys, and expire the soonest one, so put your high priority data with a longer expire and you'll be fine.
- robhu 16y agoThank you ^_^