Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nextastic/cache

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nextastic/cache - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

14

dist/get.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.get = get;
const redis_1 = require("@nextastic/redis");
const node_process_1 = __importDefault(require("node:process"));
const driver = node_process_1.default.env.CACHE_DRIVER ?? 'redis';
async function get(key, defaultValue) {
const redis = await (0, redis_1.createRedisClient)();
const value = await redis.get(key);
return value ?? defaultValue;
if (driver === 'redis') {
const redis = await (0, redis_1.createRedisClient)();
const value = await redis.get(key);
return value ?? defaultValue;
}
return defaultValue;
}
{
"name": "@nextastic/cache",
"version": "0.1.0",
"version": "0.2.0",
"description": "Cache provider to store and retrieve data. ",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc