added support for in-memory caching for read-only cache