Add (infinite) caching and logging