Caching entities in local storage