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

mikro-orm-cache-adapter-redis

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mikro-orm-cache-adapter-redis - npm Package Compare versions

Comparing version 0.1.5 to 1.0.0

CHANGELOG.md

10

dist/RedisCacheAdapter.d.ts
import { CacheAdapter } from '@mikro-orm/core';
import { RedisOptions } from 'ioredis';
export interface RedisCacheAdapterOptions extends RedisOptions {
import type { Redis, RedisOptions } from 'ioredis';
export interface BaseOptions {
expiration?: number;
debug?: boolean;
}
export interface BuildOptions extends BaseOptions, RedisOptions {
}
export interface ClientOptions extends BaseOptions {
client: Redis;
}
export declare type RedisCacheAdapterOptions = BuildOptions | ClientOptions;
export declare class RedisCacheAdapter implements CacheAdapter {

@@ -8,0 +14,0 @@ private readonly client;

12

dist/RedisCacheAdapter.js

@@ -57,8 +57,14 @@ "use strict";

function RedisCacheAdapter(options) {
var _a = options.debug, debug = _a === void 0 ? false : _a, expiration = options.expiration, redisOpt = __rest(options, ["debug", "expiration"]);
this.client = new ioredis_1.default(redisOpt);
var _a = options.debug, debug = _a === void 0 ? false : _a, expiration = options.expiration;
if (options.client) {
this.client = options.client;
}
else {
var _b = options, _c = _b.keyPrefix, keyPrefix = _c === void 0 ? 'mikro:' : _c, redisOpt = __rest(_b, ["keyPrefix"]);
this.client = new ioredis_1.default(redisOpt);
}
this.debug = debug;
this.expiration = expiration;
if (this.debug) {
console.log("redis client created", redisOpt);
console.log("redis client created");
}

@@ -65,0 +71,0 @@ }

{
"name": "mikro-orm-cache-adapter-redis",
"version": "0.1.5",
"version": "1.0.0",
"description": "A redis cache adapter for mikro-orm",

@@ -16,9 +16,12 @@ "main": "dist/index.js",

"dependencies": {
"@types/ioredis": "^4.19.1",
"ioredis": "^4.19.4"
"@types/ioredis": "^4.19.1"
},
"devDependencies": {
"@mikro-orm/core": "^4.3.4",
"ioredis": "^4.22.0",
"typescript": "^4.1.3"
},
"peerDependencies": {
"ioredis": "^4.22.0"
},
"files": [

@@ -25,0 +28,0 @@ "dist"

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