Data Cacher
Caches data in a predetermined range.
Installation
npm install mag-data-cacher
Usage
Add the constructor to the scope:
var DataCacher = ;
Create instance with custom config:
var dataCacher = pageSize: 7 cacheSize: 2 request: {} { // } ;
To check and get data for next page:
var { console; console;}; dataCacher;
To check and get data for previous page:
dataCacher;
To check and get data for 1st page:
dataCacher;
To check and get data for last page:
dataCacher;
To refresh data:
dataCacher;
Contribution
If you have any problems or suggestions please open an issue according to the contribution rules.
License
mag-data-cacher
is released under the MIT License.