Code Smell 49 - Caches
Caches are sexy. They are a one-night stand. We need to avoid them in a long-term relationship.
TL;DR: Any junior student can create a cache. Almost no senior developer can debug and invalidate them.
Problems
Coupling
Testability
Cache invalidat...
maximilianocontieri.com2 min read
Manjunath Reddy
Building Stuff. Learning more Stuff.
Hey Maxi, love all the series about the Code smell :-).
Just a curious about this line
return $this->inbox->retrieveAndRemove($title);Here, we retrieve the title from cache and remove it immediately? Why do we retrieve and remove? Wouldn't it increase the write-to-cache ratio by deleting cache quite often :-) ? whats your thoughts on that?