add ability to cache retrieved data in memory when using SQL-based storage