New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cache-driver-cache

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

cache-driver-cache

A cache package adapter for cache-driver

1.0.1
unpublished
latest
Source
npm
Version published
Maintainers
1
Created
Source

Cache Adapter for Cache Driver

About

Installation

npm install cache cache-driver-cache --save

Usage (Packages)

This section is if you're adding this driver to your package. It also assumes you're using TypeScript.

import { Cache } from "cache-driver"

export class MyAwesomeClass {
    private cache: Cache|null = null;

    constructor(cache?: Cache) {
        if (cache) {
            this.cache = cache;
        }
    }

    public someMethod() {
        if (this.cache !== null) {
            this.cache.save("sessionId", "somerandomstring", 2);
        }
    }
}

Usage (Product)

This is assuming you're using MyAwesomeClass from above as well as TypeScript. This also assumes you're using the cache package.

import { CacheAdapter } from "cache-driver-cache"

let awesome = new MyAwesomeClass(new CacheAdapater());

Keywords

cache

FAQs

Package last updated on 29 Jan 2019

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