https://github.com/nikhilcodes/amnestic-express
A middleware for ExpressJS to make it suffer from amnesia [in memory caching using amnesia-js]
https://github.com/nikhilcodes/amnestic-express
Last synced: 3 months ago
JSON representation
A middleware for ExpressJS to make it suffer from amnesia [in memory caching using amnesia-js]
- Host: GitHub
- URL: https://github.com/nikhilcodes/amnestic-express
- Owner: NikhilCodes
- License: agpl-3.0
- Created: 2021-09-16T09:02:31.000Z (almost 4 years ago)
- Default Branch: dev
- Last Pushed: 2021-09-17T20:08:31.000Z (almost 4 years ago)
- Last Synced: 2025-02-09T22:18:56.006Z (5 months ago)
- Language: TypeScript
- Size: 29.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @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](https://github.com/NikhilCodes/AmnesiaDB)
Example:
```javascript
import { CacheMiddlewareFactory } from '@amnesia-js/express-cache';let acm = new CacheMiddlewareFactory();
acm.connect({ port: 4224 }) // Connecting to default port and hostapp.use(acm.getMiddleware({ nfetch: 2 })); // Attaching middleware
```