How to gracefully handle cache expiration(alekseykorzun.com) |
How to gracefully handle cache expiration(alekseykorzun.com) |
I'm also aware there are other ways to approach this problem, this post is aimed to people who are not very advanced when it comes to caching dynamic data.
Thanks!
For which operation are you suggesting to use add() method? As far as I can see (and I just walked in so I might be overlooking something) you want to set data (overwrite) if it exist.
Add() will fail if key already exist (which should be the case under full load) and you will end up using set() anyways.