Refactoring cache to use persister decorator