think-cache-file
TypeScript icon, indicating that this package has built-in type declarations

1.1.2 • Public • Published

think-cache-file

Build Status Coverage Status npm

Use file to cache data

Install

npm install think-cache-file

How to Usage

edit config file src/config/adapter.js, add options:

const fileCache = require('think-cache-file');
exports.cache = {
  type: 'file',
  common: {
    timeout: 24 * 60 * 60 * 1000, // millisecond
  },
  file: {
    handle: fileCache,
    cachePath: '/home/usr/data',  // absolute path is necessarily required
    pathDepth: 1,
    gcInterval: 24 * 60 * 60 * 1000 // gc
  }
}

Readme

Keywords

Package Sidebar

Install

npm i think-cache-file

Weekly Downloads

124

Version

1.1.2

License

ISC

Unpacked Size

9.5 kB

Total Files

8

Last publish

Collaborators

  • lizheming
  • welefen
  • sijiecai
  • lushijie
  • berwin
  • bezos
  • toxicjohann
  • huangxiaolu