Persistent cache

Builds successfully, no specific test cases for cache persistence yet (if I remember that correctly), samples use non-persistent cache.