Caching functor