Digitalist Network // October 05 2016
Create client side cache using ES6 Proxy
With the release of ES6 (ECMAScript 2015) they added the new Proxy feature. It lets you create a middleware when doing changes to a object.
With the release of ES6 (ECMAScript 2015) they added the new Proxy feature. It lets you create a middleware when doing changes to a object. We will use this to build a simple cache helper for the client side. We will use sessionStorage to store the data so we don’t have to care about invalidation.
Where we do our api calls we can use it like this: