@fatcherjs/middleware-cache
TypeScript icon, indicating that this package has built-in type declarations

3.0.0-alpha-10 • Public • Published

@fatcherjs/middleware-cache

npm package install size Size

Install

NPM

>$ npm install @fatcherjs/middleware-cache

CDN

<script src="https://cdn.jsdelivr.net/npm/@fatcherjs/middleware-cache/dist/index.min.js"></script>

Usage

import { fatcher } from 'fatcher';
import { cache } from '@fatcherjs/middleware-cache';

fatcher('https://foo.bar', {
  middlewares: [
    cache({
      /* Options*/
    }),
  ],
});

Options

ttl

import { fatcher } from 'fatcher';
import { cache } from '@fatcherjs/middleware-cache';

fatcher('https://foo.bar', {
  middlewares: [
    cache({
      ttl: 5 * 1000, // Cache in 5 seconds
    }),
  ],
});

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @fatcherjs/middleware-cache

Weekly Downloads

14

Version

3.0.0-alpha-10

License

none

Unpacked Size

5.61 kB

Total Files

7

Last publish

Collaborators

  • fanhaoyuan