Caching and logging