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

think-cache

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

think-cache - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

5

cache.js

@@ -16,6 +16,6 @@ const assert = require('assert');

assert(name && helper.isString(name), 'cache.name must be a string');
if (this.config) {
if (config) {
config = helper.parseAdapterConfig(this.config('cache'), config);
} else {
config = helper.parseAdapterConfig(config);
config = helper.parseAdapterConfig(this.config('cache'));
}

@@ -36,2 +36,3 @@ const Handle = config.handle;

}
// get cache when value is function

@@ -38,0 +39,0 @@ if (helper.isFunction(value)) {

2

package.json
{
"name": "think-cache",
"description": "Cache for ThinkJS",
"version": "1.0.5",
"version": "1.0.6",
"author": {

@@ -6,0 +6,0 @@ "name": "welefen",

@@ -5,3 +5,3 @@ /*

* @Last Modified by: lushijie
* @Last Modified time: 2017-03-15 10:28:20
* @Last Modified time: 2017-09-13 11:49:47
*/

@@ -19,3 +19,3 @@ import test from 'ava';

return {
type: 'cache'
type: 'file'
}

@@ -55,2 +55,3 @@ }

test('get by cache name', async t => {

@@ -66,3 +67,16 @@ let ret = await cacheDB.apply(thisConfig, ['name', undefined, getConfig()]);

test('set cache 2', async t => {
const this_Config = {
config(name) {
return {
type: 'file',
handle: Redis
}
}
}
let ret = await cacheDB.apply(this_Config, ['name', 'thinkjs']);
t.true(ret);
});
test('get cache when value is function and function return undefined', async t => {

@@ -69,0 +83,0 @@ let argName = 'nothave';

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