Configurable key caching