fastify-lru-cache

1.0.0 • Public • Published

fastify-lru-cache

fastify plugin for lru cache

install

npm install fastify-lru-cache

Usage

const fastify = require('fastify')()
const fastifyLRUCache = require('fastify-lru-cache')

fastify
    .register(fastifyLRUCache, {
      instance: 'lru',
      max: 500
    })
    .ready()

fastify.listen(3000, () => {
  console.log('> listening on port 3000')
})
  • instance: (optional) the name of instance will be mapped to fastify, default is cache
  • other lru-cache configurations, you can see here.

Readme

Keywords

none

Package Sidebar

Install

npm i fastify-lru-cache

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

2.95 kB

Total Files

6

Last publish

Collaborators

  • meixg