Socket
Socket
Sign inDemoInstall

node-cache-manager-sqlite

Package Overview
Dependencies
121
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-cache-manager-sqlite

A modern SQLite store for node-cache-manager


Version published
Maintainers
1
Created

Readme

Source

SQLite store for node cache manager

A modern SQlite cache store for node-cache-manager. Featuring:

  • Async SQLite3 using sqlite3
  • async/await support with Promise
  • 100% test coverage and production ready
  • Smart purging support

Installation

npm i cache-manager-sqlite

Requirements

Usage

const sqliteStore = require('cache-manager-sqlite')
const cacheManager = require('cache-manager')

// SQLite :memory: cache store
const memStoreCache = cacheManager.caching({
    store: sqliteStore
})

// On disk cache on employees table
const cache = cacheManager.caching({
    store: sqliteStore,
    name: 'employees',
    path: '/tmp/cache.db'
})


await cache.set('foo', {test: 'bar'}, {ttl: 10000})
const valu = await cache.get('foo')
// value = {test: 'bar'} here

License

The node-cache-manager-sqlite is licensed under the MIT license.

Keywords

FAQs

Last updated on 11 Jul 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc