caching and test for encryption