[Issue 294] Add pluggable in-memory caching