Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alincode/ajax-caching
https://github.com/alincode/ajax-caching
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alincode/ajax-caching
- Owner: alincode
- Created: 2019-01-08T08:52:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-25T01:05:30.000Z (almost 5 years ago)
- Last Synced: 2024-12-06T07:35:17.772Z (30 days ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AJAX caching
![Travis](https://img.shields.io/travis/alincode/ajax-caching.svg)
[![codecov](https://codecov.io/gh/alincode/ajax-caching/branch/master/graph/badge.svg)](https://codecov.io/gh/alincode/ajax-caching)
![npm downloads](https://img.shields.io/npm/dt/ajax-caching.svg)
[![Dependency Status](https://img.shields.io/david/alincode/ajax-caching.svg?style=flat)](https://david-dm.org/alincode/ajax-caching)### Feature
* It could help you quickly AJAX caching result.
### Install
```sh
npm install ajax-caching
```### usage
* use cache
```js
const compilerURL = 'https://solc-bin.ethereum.org/bin/soljson-v0.4.25+commit.59dbf8f1.js';
const opts = { url: compilerURL, caching: true };
let source = await promiseAjax(opts);
```* don't use cache
```js
const compilerURL = 'https://solc-bin.ethereum.org/bin/soljson-v0.4.25+commit.59dbf8f1.js';
const opts = { url: compilerURL, caching: false };
let source = await promiseAjax(opts);
```* simple to use
```js
const compilerURL = 'https://solc-bin.ethereum.org/bin/soljson-v0.4.25+commit.59dbf8f1.js';
let source = await promiseAjax(compilerURL);
```## License
MIT © [alincode](https://github.com/alincode/ajax-caching)