bring persistence in request cache

Adds `cache.persist` which provides an interface similar to `cache` but stores data in localStorage.