mojito-cache
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "mojito-cache", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A set of libraries for various caching strategies in mojito.", | ||
@@ -5,0 +5,0 @@ "main": " ", |
@@ -12,10 +12,11 @@ /* | ||
var originalDispatcher = Y.mojito.Dispatcher, | ||
var staticAppConfig, | ||
refreshedAddons, | ||
enabled = true, | ||
originalDispatcher = Y.mojito.Dispatcher, | ||
OriginalActionContext = Y.mojito.ActionContext, | ||
RequestCacheDispatcher = function () { | ||
var staticAppConfig, | ||
refreshedAddons, | ||
enabled = true; | ||
/** | ||
@@ -184,14 +185,16 @@ * Here we will mimic what the ActionContext constructor does, | ||
RequestCacheActionContext = function (options) { | ||
var newExpandedResource = new ExpandedResource({ | ||
actionContext: this, | ||
controller: options.controller | ||
}), | ||
instance = options.command.instance, | ||
cache = options.adapter.req.globals['request-cache']; | ||
if (enabled) { | ||
var newExpandedResource = new ExpandedResource({ | ||
actionContext: this, | ||
controller: options.controller | ||
}), | ||
instance = options.command.instance, | ||
cache = options.adapter.req.globals['request-cache']; | ||
// Save the references in either byBase or byType | ||
if (instance.base) { | ||
cache.byBase[instance.base] = newExpandedResource; | ||
} else if (instance.type) { | ||
cache.byType[instance.type] = newExpandedResource; | ||
// Save the references in either byBase or byType | ||
if (instance.base) { | ||
cache.byBase[instance.base] = newExpandedResource; | ||
} else if (instance.type) { | ||
cache.byType[instance.type] = newExpandedResource; | ||
} | ||
} | ||
@@ -198,0 +201,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
21473
433