In my previous post I gave some examples on how caching can evolve. However , what annoys me in the second and third approach is that I have some extra code and dependencies which are not really related to my class. The examples bellow detail how you can use a decorator to cache another class.