added tests for cache