@tyagoveras/obi-decorator-cache-redis

1.0.3 • Public • Published

Configure this package

----------------------

1 - Create a new file called .obi-cacherc.json in the root of your project.

2 - Add the following configuration to the file:

{
  "connection": {
    "url": "redis://localhost:6379"
  },
  "rootKey": "root",
  "allowPersistDataIfNotFound": true,
  "ttl": 60
}

3 - Replace the url value with your Redis server URL.

4 - Replace the rootKey value with the key you want to use as the root key.

5 - Replace the allowPersistDataIfNotFound value with true if you want to persist the data if the key is not found.

6 - Replace the ttl value with the time to live in seconds.

7 - To disconnect from the Redis server, use the following code:

import { ObiCacheDisconnectInstance } from 'obi-cache';

ObiCacheDisconnectInstance();

----------------------

Readme

Keywords

none

Package Sidebar

Install

npm i @tyagoveras/obi-decorator-cache-redis

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

22.1 kB

Total Files

15

Last publish

Collaborators

  • tyagoveras