Added parameter to be able to provide a custom caching layer