Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 672 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 672 Bytes

easy-cache

Simple cache utils for JS

Non-minified: 2 kB

Minified: 0.5 kB

easycache.init(cacheName)
Initializes the cache using the provided name.

easycache.put(url, data)
Stores the specified data into the cache under the provided URL key.

easycache.get(url)
Retrieves the specified data under the provided URL key from the cache.

easycache.has(url)
Checks if the specified URL key is stored in the cache.

easycache.fetch(url, opt)
Performs a fetch request or fetches the cache if already stored. Returns the response.

easycache.fetchOverwrite(url, opt)
Performs a fetch request and stores the result into cache.