persistent caching to memory, disk, or database