5. Cache/Caching
In computing, a cache is a hardware or software component
that stores data so that future requests for that data can
be served faster; the data stored in a cache might be the
result of an earlier computation or a copy of data stored
elsewhere
// Wikipedia
11. The good the bad the ugly
https://github.com/reddit-archive/reddit/blob/master/r2/r2/lib/db/queries.py
12. Caching is hard
There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton
- Cache invalidation
- Code complexity
- More resources to manage
- Hard to fix data related bugs
- ....
27. And this is how this mechanism has been applied in Rails
https://github.com/rails/rails/blob/b9ca94caea2ca6a6cc09abaffaad67b447134079/activesupport/lib/active_support/core_ext/
module/attribute_accessors_per_thread.rb#L145