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

zcache

Package Overview
Dependencies
Maintainers
7
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zcache - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

dump.rdb

10

lib/CacheCluster.js

@@ -14,2 +14,3 @@ // Copyright 2014 The Obvious Corporation.

var metrics = require('metrics')
var cacheUtils = require('./CacheUtils')

@@ -221,2 +222,11 @@ /**

/** @override */
CacheCluster.prototype.getPendingRequestsCount = function () {
var cacheInstances = []
for (var uri in this._servers) {
cacheInstances.push(this._servers[uri])
}
return cacheUtils.mergePendingRequestCounts(cacheInstances)
}
/**

@@ -223,0 +233,0 @@ * Reset the partial failure count of a certain operation.

@@ -226,2 +226,10 @@ // Copyright 2014 The Obvious Corporation.

/**
* Gets a map of cacheInstance uri and the requestCounts
* @return {Object}
*/
CacheInstance.prototype.getPendingRequestsCount = function () {
throw new Error("getPendingRequestsCount() must be implemented by any class extending CacheInstance")
}
/**
* Get the Counter object that tracks the number of timeouts of a certain

@@ -228,0 +236,0 @@ * operations.

@@ -146,2 +146,9 @@ // Copyright 2013 The Obvious Corporation.

/** @inheritDoc */
CacheInstance.prototype.getPendingRequestsCount = function () {
var requestCounts = {}
requestCounts['count'] = 0
return [requestCounts]
}
// Create a reaper which scans through all of the items in _data every

@@ -148,0 +155,0 @@ // this._reaperIntervalMs millisseconds, if the item has expired then

4

lib/MultiplexingCache.js

@@ -272,2 +272,6 @@ // Copyright 2014 A Medium Corporation

}
/** @inheritDoc */
MultiplexingCache.prototype.getPendingRequestsCount = function () {
return this._delegate.getPendingRequestsCount()
}

@@ -274,0 +278,0 @@

@@ -12,2 +12,3 @@ // Copyright 2014 The Obvious Corporation.

var CacheInstance = require('./CacheInstance')
var cacheUtils = require('./CacheUtils')

@@ -132,2 +133,7 @@ /**

/** @override */
MultiWriteCacheGroup.prototype.getPendingRequestsCount = function () {
return cacheUtils.mergePendingRequestCounts(this._writeOnlyInstances.concat(this._instance))
}
module.exports = MultiWriteCacheGroup

@@ -159,2 +159,11 @@ var redis = require('redis')

/** @inheritDoc */
RedisConnection.prototype.getPendingRequestsCount = function () {
var requestCounts = {
'uri': this._host + ':' + this._port,
'count': this._client.command_queue.length
}
return [requestCounts]
}
RedisConnection.prototype._onConnect = function () {

@@ -161,0 +170,0 @@ this._isAvailable = true

@@ -5,2 +5,3 @@ var util = require('util')

var CacheInstance = require('./CacheInstance')
var cacheUtils = require('./CacheUtils')

@@ -160,2 +161,7 @@ function RedundantCacheGroup() {

/** @override */
RedundantCacheGroup.prototype.getPendingRequestsCount = function () {
return cacheUtils.mergePendingRequestCounts(cacheInstnaces.map(function (obj) { return obj.instance }))
}
/**

@@ -162,0 +168,0 @@ * Always return true

2

package.json
{
"name": "zcache",
"description": "AWS zone-aware multi-layer cache",
"version": "0.3.1",
"version": "0.3.2",
"homepage": "https://github.com/Obvious/zcache",

@@ -6,0 +6,0 @@ "authors": [

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