deep-cache
Advanced tools
Comparing version 1.5.3 to 1.5.4
@@ -13,3 +13,3 @@ /** | ||
var _get = function get(_x8, _x9, _x10) { var _again = true; _function: while (_again) { var object = _x8, property = _x9, receiver = _x10; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x8 = parent; _x9 = property; _x10 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
var _get = function get(_x9, _x10, _x11) { var _again = true; _function: while (_again) { var object = _x9, property = _x10, receiver = _x11; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x9 = parent; _x10 = property; _x11 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
@@ -150,11 +150,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var removedKeys = []; | ||
var keysToRemove = []; | ||
_store2['default'].forEach(function (key, val) { | ||
if (_this.isDeepKey(key) && !LocalStorageDriver._isAlive(val, key)) { | ||
removedKeys.push(key); | ||
// @note - do not remove keys from cache at iteration time, it breaks the loop | ||
if (_this.isDeepKey(key) && !LocalStorageDriver._isAlive(val, key, false)) { | ||
keysToRemove.push(key); | ||
} | ||
}); | ||
return removedKeys.length > 0; | ||
keysToRemove.forEach(function (key) { | ||
_store2['default'].remove(key); | ||
}); | ||
return keysToRemove.length > 0; | ||
} | ||
@@ -188,2 +193,3 @@ | ||
* @param {String} key | ||
* @param {Boolean} removeStale | ||
* @returns {Boolean} | ||
@@ -193,2 +199,4 @@ * @private | ||
value: function _isAlive(response, key) { | ||
var removeStale = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; | ||
if (!response) { | ||
@@ -199,3 +207,5 @@ return false; | ||
if (response.exd && response.exd <= LocalStorageDriver._now) { | ||
_store2['default'].remove(key); | ||
if (removeStale) { | ||
_store2['default'].remove(key); | ||
} | ||
return false; | ||
@@ -202,0 +212,0 @@ } |
{ | ||
"name": "deep-cache", | ||
"version": "1.5.3", | ||
"version": "1.5.4", | ||
"description": "DEEP Cache Library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -143,5 +143,6 @@ DEEP Cache Library (deep-cache) | ||
--------|---------|------ | ||
Implement [RUM](https://en.wikipedia.org/wiki/Real_user_monitoring) as part of deep-logs | Achieve real user monitoring by logging all user actions and visualize them with an [ELK stack](https://www.elastic.co/webinars/introduction-elk-stack) | [@mgoria](https://github.com/mgoria) | ||
Implement deep-search | Full text search service on top of [Amazon CloudSearch](https://aws.amazon.com/cloudsearch/) | [@alexanderc](https://github.com/alexanderc) | ||
Implement deep-security | Security service on top of [IAM](https://aws.amazon.com/iam/) | [@mgoria](https://github.com/mgoria) | ||
Implement deep-notification | Push notification service on top of [SNS](https://aws.amazon.com/sns/) that supports push to mobile devices, web browsers, email and sms. | [@alexanderc](https://github.com/alexanderc) | ||
Implement deep-search | Full text search service on top of [Amazon CloudSearch](https://aws.amazon.com/cloudsearch/) | [@alexanderc](https://github.com/alexanderc) | ||
Implement deep-event | Event manager service using Lambda scheduling, Kinesis stream, Dynamo streaming, SQS, etc. | ... | ||
@@ -152,4 +153,2 @@ Implement deep-db "eventual consistency" | Achieve "eventual consistency" by offloading data to [SQS](https://aws.amazon.com/sqs/) as the default option | [@alexanderc](https://github.com/alexanderc) | ||
Implement deep-cache | Cache service on top of [Elasticache](https://aws.amazon.com/elasticache/) ([Redis](http://redis.io)) inside Lambdas (blocked by VPC support in Lambda) | ... | ||
Implement [RUM](https://en.wikipedia.org/wiki/Real_user_monitoring) as part of deep-logs | Achieve real user monitoring by logging all user actions and visualize them with an [ELK stack](https://www.elastic.co/webinars/introduction-elk-stack) | ... | ||
Optimize the framework to reduce the size of Lambda functions | Optimize deps and packing as well as browserify process to reduce framework size | [@alexanderc](https://github.com/alexanderc) | ||
Improve documentation for each deep-* library | Update docs for deep libraries and development tools | [@alexanderc](https://github.com/alexanderc) [@mgoria](https://github.com/mgoria) | ||
@@ -156,0 +155,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83211
1509
196