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

mqemitter-redis

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mqemitter-redis - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

4

mqemitter-redis.js

@@ -28,4 +28,4 @@ 'use strict'

this._cache = new LRUCache({
max: 10000,
ttl: 60 * 1000 // one minute
max: opts.maxLRUCache || 10000, // default: 10k
ttl: opts.ttlLRUCache || 60 * 1000 // default: one minute
})

@@ -32,0 +32,0 @@

{
"name": "mqemitter-redis",
"version": "6.0.0",
"version": "6.1.0",
"description": "Redis-based MQEmitter",

@@ -5,0 +5,0 @@ "main": "mqemitter-redis.js",

@@ -13,6 +13,11 @@ import type { RedisOptions } from 'ioredis';

export interface LRUCacheOptions {
ttlLRUCache?: number;// Time to live for the LRU cache in milliseconds
maxLRUCache?: number;// Maximum number of items in the LRU cache
}
export type Message = Record<string, any> & { topic: string };
export interface MQEmitterRedis extends MQEmitter {
new (options?: MQEmitterOptions & RedisOptions): MQEmitterRedis;
new (options?: MQEmitterOptions & RedisOptions & LRUCacheOptions): MQEmitterRedis;
current: number;

@@ -35,5 +40,5 @@ concurrent: number;

declare function MQEmitterRedis(
options?: MQEmitterOptions & RedisOptions
options?: MQEmitterOptions & RedisOptions & LRUCacheOptions
): MQEmitterRedis;
export default MQEmitterRedis;

@@ -32,2 +32,9 @@ import { expectError, expectType } from 'tsd';

expectType<MQEmitterRedis>(
mqEmitterRedis({
maxLRUCache: 100,
ttlLRUCache: 10000,
})
);
function listener(message: Message, done: () => void) {}

@@ -34,0 +41,0 @@

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