Framework for in-memory and database caching strategy.