-
Notifications
You must be signed in to change notification settings - Fork 303
API caching
Yash Thakur edited this page Oct 7, 2017
·
6 revisions
Wait what? Why do you need to cache API ? With service worker & cache mechanisms, even opaque response can be cached (no kidding!).
You can add caching to api by following method:
api.fetch("api call link", { swcache: 20 });
The swcache
will cache the api request with the service worker for mentioned period of seconds.
Powered by Atyantik Technologies Private Limited