Socket
Book a DemoInstallSign in
Socket

@postnord/pretty-redis

Package Overview
Dependencies
Maintainers
14
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@postnord/pretty-redis

An abstraction layer on top of Redis to improve the interface and Typescript compatibility

latest
npmnpm
Version
0.0.11
Version published
Maintainers
14
Created
Source

An abstraction layer on top of the Redis native driver. Exposes a set of clean methods to deal with caching.

Installation

Run npm i pretty-dynamo @aws/dynamodb-data-mapper-annotations and you're good to go.

import { RedisMemoryMethods } from 'pretty-redis'

const myService = new RedisMemoryMethods('localhost')

await myService.storeRecord({ key: 'a', value: 'b' })
expect(await myService.getRecord({ key: 'a' })).toBe('b')

API

getRecord({ key: string })

storeRecord({ key: string, value: string, options?: { expiresInSeconds?: number })

FAQs

Package last updated on 06 May 2021

Did you know?

Socket

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