caching and logging