NikhilCodes / amnestic-express

A middleware for ExpressJS to make it suffer from amnesia [in memory caching using amnesia-js]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@amnesia-js/express-cache

Short Description: A library to help express suffer from Amnesia.

Long Description: This library provides middleware to help express cache responses using AmnesiaDB

Example:

import { CacheMiddlewareFactory } from '@amnesia-js/express-cache';

let acm = new CacheMiddlewareFactory();
acm.connect({ port: 4224 }) // Connecting to default port and host

app.use(acm.getMiddleware({ nfetch: 2 }));  // Attaching middleware

About

A middleware for ExpressJS to make it suffer from amnesia [in memory caching using amnesia-js]

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 93.7%Language:JavaScript 6.3%