exframe-cache-manager 1.3.0 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +2 -16
- package/docker-compose.yml +1 -0
- package/index.js +206 -209
- package/package.json +5 -5
- package/test/.eslintrc.json +3 -0
- package/documentation/coverage/cc66d9f8-df92-4a7d-8ac7-4bf9b8af1beb.json +0 -1
- package/documentation/coverage/lcov-report/base.css +0 -224
- package/documentation/coverage/lcov-report/block-navigation.js +0 -87
- package/documentation/coverage/lcov-report/favicon.png +0 -0
- package/documentation/coverage/lcov-report/index.html +0 -116
- package/documentation/coverage/lcov-report/index.js.html +0 -712
- package/documentation/coverage/lcov-report/prettify.css +0 -1
- package/documentation/coverage/lcov-report/prettify.js +0 -2
- package/documentation/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/documentation/coverage/lcov-report/sorter.js +0 -196
- package/documentation/coverage/lcov.info +0 -135
- package/documentation/coverage/processinfo/cc66d9f8-df92-4a7d-8ac7-4bf9b8af1beb.json +0 -1
- package/documentation/coverage/processinfo/index.json +0 -1
- package/junit/0734a901-64dd-4fee-afea-9288c3f8251d.xml +0 -27
package/.eslintrc.json
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"node": true
|
|
5
|
-
},
|
|
6
|
-
"extends": "airbnb-base",
|
|
7
|
-
"rules": {
|
|
8
|
-
"comma-dangle": ["error", "never"],
|
|
9
|
-
"strict": ["off", "global"] ,
|
|
10
|
-
"consistent-return": "off",
|
|
11
|
-
"linebreak-style": ["error", "windows"],
|
|
12
|
-
"max-len": ["error", 200],
|
|
13
|
-
"no-param-reassign": ["error", { "props": false }],
|
|
14
|
-
"no-underscore-dangle": "off",
|
|
15
|
-
"arrow-parens": "off"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
2
|
+
"extends": "exzeo/base"
|
|
3
|
+
}
|
package/docker-compose.yml
CHANGED
package/index.js
CHANGED
|
@@ -1,209 +1,206 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const CacheManager = require('cache-manager');
|
|
4
|
-
const RedisStore = require('cache-manager-redis');
|
|
5
|
-
const util = require('util');
|
|
6
|
-
const { lazyInstrument } = require('exframe-metrics');
|
|
7
|
-
|
|
8
|
-
const db = 0;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Cache manager for storing stuff.
|
|
12
|
-
* Options is required to pass the redis location
|
|
13
|
-
* @param {Options} options
|
|
14
|
-
*/
|
|
15
|
-
function cachemanager(options) {
|
|
16
|
-
if (options.url) {
|
|
17
|
-
options.host = undefined;
|
|
18
|
-
options.port = undefined;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const redisCache = CacheManager.caching({
|
|
22
|
-
store: RedisStore,
|
|
23
|
-
ttl: 600,
|
|
24
|
-
db,
|
|
25
|
-
...options
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
const redisStore = redisCache.store;
|
|
30
|
-
|
|
31
|
-
// need to expose the store's connection pool after it's created by the cache manager as it does not seem to have a way to pass it in
|
|
32
|
-
// if we use something besides redis, we'll have to tackle this differently
|
|
33
|
-
const cacheStorePool = Object.assign(redisStore._pool, { db });
|
|
34
|
-
cacheStorePool.setMaxListeners(0);
|
|
35
|
-
|
|
36
|
-
const instance = {
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @param {string} key
|
|
40
|
-
*/
|
|
41
|
-
getItem(key) {
|
|
42
|
-
return redisCache.get(key);
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @template T
|
|
48
|
-
* @param {string} key
|
|
49
|
-
* @param {T} value
|
|
50
|
-
* @param {number} [ttl]
|
|
51
|
-
* @returns {Promise<T>}
|
|
52
|
-
*/
|
|
53
|
-
async setItem(key, value, ttl) {
|
|
54
|
-
await redisCache.set(key, value, {
|
|
55
|
-
ttl: ttl || Number(process.env.REDIS_CACHE_TTL)
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
return value;
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @param {string} key
|
|
64
|
-
* @param {any} value
|
|
65
|
-
*/
|
|
66
|
-
addSetItem(key, value) {
|
|
67
|
-
return this.processRedisCommands(client => client.sadd(key, value));
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
* @param {string} key
|
|
73
|
-
* @param {any} value
|
|
74
|
-
*/
|
|
75
|
-
removeSetItem(key, value) {
|
|
76
|
-
return this.processRedisCommands(client => client.srem(key, value));
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* @param {string} key
|
|
82
|
-
* @param {any} value
|
|
83
|
-
* @returns {Promise<Boolean>}
|
|
84
|
-
*/
|
|
85
|
-
isSetMember(key, value) {
|
|
86
|
-
return this.processRedisCommands(async client => new Promise((res, rej) => {
|
|
87
|
-
client.sismember(key, value, (ex, result) => {
|
|
88
|
-
if (ex) return rej(ex);
|
|
89
|
-
res(result === 1);
|
|
90
|
-
});
|
|
91
|
-
}));
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* @returns {Promise<true>}
|
|
96
|
-
*/
|
|
97
|
-
async healthCheck() {
|
|
98
|
-
return this.processRedisCommands(client => client && client.server_info.loading === '0');
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
close() {
|
|
102
|
-
return new Promise(res => {
|
|
103
|
-
cacheStorePool.drain(res);
|
|
104
|
-
});
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
getClient() {
|
|
108
|
-
return new Promise((resolve, reject) => {
|
|
109
|
-
cacheStorePool.acquireDb(async (connError, client) => {
|
|
110
|
-
let timeout;
|
|
111
|
-
|
|
112
|
-
if (connError) {
|
|
113
|
-
return reject(connError);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (client.connected) {
|
|
117
|
-
return resolve(client);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
client.once('ready', () => {
|
|
121
|
-
clearTimeout(timeout);
|
|
122
|
-
resolve(client);
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
timeout = setTimeout(() => {
|
|
126
|
-
cacheStorePool.release(client);
|
|
127
|
-
reject(new Error('Timeout waiting for redis client connection'));
|
|
128
|
-
}, 10000);
|
|
129
|
-
}, db);
|
|
130
|
-
});
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
*
|
|
135
|
-
* @param {(client: any) => any} fn
|
|
136
|
-
*/
|
|
137
|
-
async processRedisCommands(fn) {
|
|
138
|
-
let client;
|
|
139
|
-
let result;
|
|
140
|
-
|
|
141
|
-
try {
|
|
142
|
-
client = await this.getClient();
|
|
143
|
-
result = await fn(client);
|
|
144
|
-
} finally {
|
|
145
|
-
if (client) {
|
|
146
|
-
cacheStorePool.release(client);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return result;
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
*
|
|
155
|
-
* @param {Context} context
|
|
156
|
-
* @param {string | RegExp} pattern
|
|
157
|
-
*/
|
|
158
|
-
flushCache(context, pattern) {
|
|
159
|
-
return this.processRedisCommands(async (client) => {
|
|
160
|
-
const scanAsync = util.promisify(client.scan).bind(client);
|
|
161
|
-
const delAsync = util.promisify(client.del).bind(client);
|
|
162
|
-
let cursor = '0';
|
|
163
|
-
do {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* @typedef {(message: string, meta: { [key: string]: any }) => void} LogLevel
|
|
209
|
-
*/
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const CacheManager = require('cache-manager');
|
|
4
|
+
const RedisStore = require('cache-manager-redis');
|
|
5
|
+
const util = require('util');
|
|
6
|
+
const { lazyInstrument } = require('exframe-metrics');
|
|
7
|
+
|
|
8
|
+
const db = 0;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Cache manager for storing stuff.
|
|
12
|
+
* Options is required to pass the redis location
|
|
13
|
+
* @param {Options} options
|
|
14
|
+
*/
|
|
15
|
+
function cachemanager(options) {
|
|
16
|
+
if (options.url) {
|
|
17
|
+
options.host = undefined;
|
|
18
|
+
options.port = undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const redisCache = CacheManager.caching({
|
|
22
|
+
store: RedisStore,
|
|
23
|
+
ttl: 600,
|
|
24
|
+
db,
|
|
25
|
+
...options
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const redisStore = redisCache.store;
|
|
30
|
+
|
|
31
|
+
// need to expose the store's connection pool after it's created by the cache manager as it does not seem to have a way to pass it in
|
|
32
|
+
// if we use something besides redis, we'll have to tackle this differently
|
|
33
|
+
const cacheStorePool = Object.assign(redisStore._pool, { db });
|
|
34
|
+
cacheStorePool.setMaxListeners(0);
|
|
35
|
+
|
|
36
|
+
const instance = {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @param {string} key
|
|
40
|
+
*/
|
|
41
|
+
getItem(key) {
|
|
42
|
+
return redisCache.get(key);
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @template T
|
|
48
|
+
* @param {string} key
|
|
49
|
+
* @param {T} value
|
|
50
|
+
* @param {number} [ttl]
|
|
51
|
+
* @returns {Promise<T>}
|
|
52
|
+
*/
|
|
53
|
+
async setItem(key, value, ttl) {
|
|
54
|
+
await redisCache.set(key, value, {
|
|
55
|
+
ttl: ttl || Number(process.env.REDIS_CACHE_TTL)
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
return value;
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @param {string} key
|
|
64
|
+
* @param {any} value
|
|
65
|
+
*/
|
|
66
|
+
addSetItem(key, value) {
|
|
67
|
+
return this.processRedisCommands(client => client.sadd(key, value));
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @param {string} key
|
|
73
|
+
* @param {any} value
|
|
74
|
+
*/
|
|
75
|
+
removeSetItem(key, value) {
|
|
76
|
+
return this.processRedisCommands(client => client.srem(key, value));
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param {string} key
|
|
82
|
+
* @param {any} value
|
|
83
|
+
* @returns {Promise<Boolean>}
|
|
84
|
+
*/
|
|
85
|
+
isSetMember(key, value) {
|
|
86
|
+
return this.processRedisCommands(async client => new Promise((res, rej) => {
|
|
87
|
+
client.sismember(key, value, (ex, result) => {
|
|
88
|
+
if (ex) return rej(ex);
|
|
89
|
+
res(result === 1);
|
|
90
|
+
});
|
|
91
|
+
}));
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @returns {Promise<true>}
|
|
96
|
+
*/
|
|
97
|
+
async healthCheck() {
|
|
98
|
+
return this.processRedisCommands(client => client && client.server_info.loading === '0');
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
close() {
|
|
102
|
+
return new Promise(res => {
|
|
103
|
+
cacheStorePool.drain(res);
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
getClient() {
|
|
108
|
+
return new Promise((resolve, reject) => {
|
|
109
|
+
cacheStorePool.acquireDb(async (connError, client) => {
|
|
110
|
+
let timeout;
|
|
111
|
+
|
|
112
|
+
if (connError) {
|
|
113
|
+
return reject(connError);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (client.connected) {
|
|
117
|
+
return resolve(client);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
client.once('ready', () => {
|
|
121
|
+
clearTimeout(timeout);
|
|
122
|
+
resolve(client);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
timeout = setTimeout(() => {
|
|
126
|
+
cacheStorePool.release(client);
|
|
127
|
+
reject(new Error('Timeout waiting for redis client connection'));
|
|
128
|
+
}, 10000);
|
|
129
|
+
}, db);
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
*
|
|
135
|
+
* @param {(client: any) => any} fn
|
|
136
|
+
*/
|
|
137
|
+
async processRedisCommands(fn) {
|
|
138
|
+
let client;
|
|
139
|
+
let result;
|
|
140
|
+
|
|
141
|
+
try {
|
|
142
|
+
client = await this.getClient();
|
|
143
|
+
result = await fn(client);
|
|
144
|
+
} finally {
|
|
145
|
+
if (client) {
|
|
146
|
+
cacheStorePool.release(client);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return result;
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @param {Context} context
|
|
156
|
+
* @param {string | RegExp} pattern
|
|
157
|
+
*/
|
|
158
|
+
flushCache(context, pattern) {
|
|
159
|
+
return this.processRedisCommands(async (client) => {
|
|
160
|
+
const scanAsync = util.promisify(client.scan).bind(client);
|
|
161
|
+
const delAsync = util.promisify(client.del).bind(client);
|
|
162
|
+
let cursor = '0';
|
|
163
|
+
do {
|
|
164
|
+
const result = await scanAsync(cursor, 'MATCH', pattern);
|
|
165
|
+
([cursor] = result);
|
|
166
|
+
const keys = result[1];
|
|
167
|
+
context.log.info('matched keys', {
|
|
168
|
+
keys: result[1]
|
|
169
|
+
});
|
|
170
|
+
if (keys.length > 0) {
|
|
171
|
+
await delAsync(...keys);
|
|
172
|
+
}
|
|
173
|
+
} while (cursor !== '0');
|
|
174
|
+
});
|
|
175
|
+
},
|
|
176
|
+
cacheStorePool
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
Object.keys(instance).forEach((key) => {
|
|
180
|
+
if (typeof instance[key] === 'function') {
|
|
181
|
+
instance[key] = lazyInstrument(instance[key].bind(instance), { metricPrefix: 'cache' });
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
return instance;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
module.exports = {
|
|
189
|
+
create: cachemanager
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* @typedef {RedisCacheManagerOptions & { store?: any, ttl?: number, db?: number }} Options
|
|
194
|
+
*/
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @typedef {{ db?: number, url?: string, host?: string, port?: string }} RedisCacheManagerOptions
|
|
198
|
+
*/
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @typedef {{ [key: string]: any, log: { [key: string]: LogLevel, info: LogLevel, error: LogLevel } }} Context
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @typedef {(message: string, meta: { [key: string]: any }) => void} LogLevel
|
|
206
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "exframe-cache-manager",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Managing the cache",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"config": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"pretest": "npm-install-peers && npm run lint",
|
|
14
|
-
"lint": "
|
|
14
|
+
"lint": "eslint ./",
|
|
15
15
|
"test": "docker-compose -f docker-compose.yml up --abort-on-container-exit --exit-code-from exframe-cache-manager",
|
|
16
|
-
"unit-test": "nyc -r lcov --report-dir ./documentation/coverage -t ./documentation/coverage mocha --reporter $npm_package_config_reporter \"./test/**/*.test.js\""
|
|
16
|
+
"unit-test": "./node_modules/.bin/nyc -r lcov --report-dir ./documentation/coverage -t ./documentation/coverage mocha --reporter $npm_package_config_reporter \"./test/**/*.test.js\""
|
|
17
17
|
},
|
|
18
18
|
"author": "Exzeo",
|
|
19
19
|
"license": "ISC",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"chai": "^4.3.4",
|
|
35
35
|
"eslint": "^8.3.0",
|
|
36
|
-
"eslint-config-
|
|
36
|
+
"eslint-config-exzeo": "*",
|
|
37
37
|
"eslint-plugin-import": "^2.25.3",
|
|
38
38
|
"mocha": "*",
|
|
39
39
|
"mocha-exzeo-reporter": "0.0.3",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"url": "https://bitbucket.org/exzeo-usa/exframe",
|
|
46
46
|
"directory": "packages/exframe-cache-manager"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "ef87c842aa08c54cbcb03ee075db8463ebc8fd43"
|
|
49
49
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"/app/index.js":{"path":"/app/index.js","statementMap":{"0":{"start":{"line":3,"column":21},"end":{"line":3,"column":45}},"1":{"start":{"line":4,"column":19},"end":{"line":4,"column":49}},"2":{"start":{"line":5,"column":13},"end":{"line":5,"column":28}},"3":{"start":{"line":6,"column":27},"end":{"line":6,"column":53}},"4":{"start":{"line":8,"column":11},"end":{"line":8,"column":12}},"5":{"start":{"line":16,"column":2},"end":{"line":19,"column":3}},"6":{"start":{"line":17,"column":4},"end":{"line":17,"column":29}},"7":{"start":{"line":18,"column":4},"end":{"line":18,"column":29}},"8":{"start":{"line":21,"column":21},"end":{"line":26,"column":4}},"9":{"start":{"line":29,"column":21},"end":{"line":29,"column":37}},"10":{"start":{"line":33,"column":25},"end":{"line":33,"column":64}},"11":{"start":{"line":34,"column":2},"end":{"line":34,"column":36}},"12":{"start":{"line":36,"column":19},"end":{"line":180,"column":3}},"13":{"start":{"line":42,"column":6},"end":{"line":42,"column":33}},"14":{"start":{"line":54,"column":6},"end":{"line":56,"column":9}},"15":{"start":{"line":58,"column":6},"end":{"line":58,"column":19}},"16":{"start":{"line":67,"column":6},"end":{"line":67,"column":74}},"17":{"start":{"line":67,"column":49},"end":{"line":67,"column":72}},"18":{"start":{"line":76,"column":6},"end":{"line":76,"column":74}},"19":{"start":{"line":76,"column":49},"end":{"line":76,"column":72}},"20":{"start":{"line":86,"column":6},"end":{"line":91,"column":10}},"21":{"start":{"line":86,"column":55},"end":{"line":91,"column":8}},"22":{"start":{"line":87,"column":8},"end":{"line":90,"column":11}},"23":{"start":{"line":88,"column":10},"end":{"line":88,"column":33}},"24":{"start":{"line":88,"column":18},"end":{"line":88,"column":33}},"25":{"start":{"line":89,"column":10},"end":{"line":89,"column":28}},"26":{"start":{"line":98,"column":6},"end":{"line":98,"column":95}},"27":{"start":{"line":98,"column":49},"end":{"line":98,"column":93}},"28":{"start":{"line":102,"column":6},"end":{"line":104,"column":9}},"29":{"start":{"line":103,"column":8},"end":{"line":103,"column":34}},"30":{"start":{"line":108,"column":6},"end":{"line":130,"column":9}},"31":{"start":{"line":109,"column":8},"end":{"line":129,"column":15}},"32":{"start":{"line":112,"column":10},"end":{"line":114,"column":11}},"33":{"start":{"line":113,"column":12},"end":{"line":113,"column":37}},"34":{"start":{"line":116,"column":10},"end":{"line":118,"column":11}},"35":{"start":{"line":117,"column":12},"end":{"line":117,"column":35}},"36":{"start":{"line":120,"column":10},"end":{"line":123,"column":13}},"37":{"start":{"line":121,"column":12},"end":{"line":121,"column":34}},"38":{"start":{"line":122,"column":12},"end":{"line":122,"column":28}},"39":{"start":{"line":125,"column":10},"end":{"line":128,"column":20}},"40":{"start":{"line":126,"column":12},"end":{"line":126,"column":43}},"41":{"start":{"line":127,"column":12},"end":{"line":127,"column":77}},"42":{"start":{"line":141,"column":6},"end":{"line":148,"column":7}},"43":{"start":{"line":142,"column":8},"end":{"line":142,"column":40}},"44":{"start":{"line":143,"column":8},"end":{"line":143,"column":34}},"45":{"start":{"line":145,"column":8},"end":{"line":147,"column":9}},"46":{"start":{"line":146,"column":10},"end":{"line":146,"column":41}},"47":{"start":{"line":150,"column":6},"end":{"line":150,"column":20}},"48":{"start":{"line":159,"column":6},"end":{"line":177,"column":9}},"49":{"start":{"line":160,"column":26},"end":{"line":160,"column":66}},"50":{"start":{"line":161,"column":25},"end":{"line":161,"column":64}},"51":{"start":{"line":162,"column":21},"end":{"line":162,"column":24}},"52":{"start":{"line":163,"column":8},"end":{"line":176,"column":33}},"53":{"start":{"line":165,"column":25},"end":{"line":165,"column":66}},"54":{"start":{"line":166,"column":10},"end":{"line":166,"column":30}},"55":{"start":{"line":167,"column":23},"end":{"line":167,"column":32}},"56":{"start":{"line":168,"column":10},"end":{"line":170,"column":13}},"57":{"start":{"line":171,"column":10},"end":{"line":173,"column":11}},"58":{"start":{"line":172,"column":12},"end":{"line":172,"column":19}},"59":{"start":{"line":175,"column":10},"end":{"line":175,"column":34}},"60":{"start":{"line":182,"column":2},"end":{"line":186,"column":5}},"61":{"start":{"line":183,"column":4},"end":{"line":185,"column":5}},"62":{"start":{"line":184,"column":6},"end":{"line":184,"column":94}},"63":{"start":{"line":188,"column":2},"end":{"line":188,"column":18}},"64":{"start":{"line":191,"column":0},"end":{"line":193,"column":2}}},"fnMap":{"0":{"name":"cachemanager","decl":{"start":{"line":15,"column":9},"end":{"line":15,"column":21}},"loc":{"start":{"line":15,"column":31},"end":{"line":189,"column":1}},"line":15},"1":{"name":"(anonymous_1)","decl":{"start":{"line":41,"column":4},"end":{"line":41,"column":5}},"loc":{"start":{"line":41,"column":17},"end":{"line":43,"column":5}},"line":41},"2":{"name":"(anonymous_2)","decl":{"start":{"line":53,"column":4},"end":{"line":53,"column":5}},"loc":{"start":{"line":53,"column":35},"end":{"line":59,"column":5}},"line":53},"3":{"name":"(anonymous_3)","decl":{"start":{"line":66,"column":4},"end":{"line":66,"column":5}},"loc":{"start":{"line":66,"column":27},"end":{"line":68,"column":5}},"line":66},"4":{"name":"(anonymous_4)","decl":{"start":{"line":67,"column":39},"end":{"line":67,"column":40}},"loc":{"start":{"line":67,"column":49},"end":{"line":67,"column":72}},"line":67},"5":{"name":"(anonymous_5)","decl":{"start":{"line":75,"column":4},"end":{"line":75,"column":5}},"loc":{"start":{"line":75,"column":30},"end":{"line":77,"column":5}},"line":75},"6":{"name":"(anonymous_6)","decl":{"start":{"line":76,"column":39},"end":{"line":76,"column":40}},"loc":{"start":{"line":76,"column":49},"end":{"line":76,"column":72}},"line":76},"7":{"name":"(anonymous_7)","decl":{"start":{"line":85,"column":4},"end":{"line":85,"column":5}},"loc":{"start":{"line":85,"column":28},"end":{"line":92,"column":5}},"line":85},"8":{"name":"(anonymous_8)","decl":{"start":{"line":86,"column":39},"end":{"line":86,"column":40}},"loc":{"start":{"line":86,"column":55},"end":{"line":91,"column":8}},"line":86},"9":{"name":"(anonymous_9)","decl":{"start":{"line":86,"column":67},"end":{"line":86,"column":68}},"loc":{"start":{"line":86,"column":81},"end":{"line":91,"column":7}},"line":86},"10":{"name":"(anonymous_10)","decl":{"start":{"line":87,"column":37},"end":{"line":87,"column":38}},"loc":{"start":{"line":87,"column":53},"end":{"line":90,"column":9}},"line":87},"11":{"name":"(anonymous_11)","decl":{"start":{"line":97,"column":4},"end":{"line":97,"column":5}},"loc":{"start":{"line":97,"column":24},"end":{"line":99,"column":5}},"line":97},"12":{"name":"(anonymous_12)","decl":{"start":{"line":98,"column":39},"end":{"line":98,"column":40}},"loc":{"start":{"line":98,"column":49},"end":{"line":98,"column":93}},"line":98},"13":{"name":"(anonymous_13)","decl":{"start":{"line":101,"column":4},"end":{"line":101,"column":5}},"loc":{"start":{"line":101,"column":12},"end":{"line":105,"column":5}},"line":101},"14":{"name":"(anonymous_14)","decl":{"start":{"line":102,"column":25},"end":{"line":102,"column":26}},"loc":{"start":{"line":102,"column":32},"end":{"line":104,"column":7}},"line":102},"15":{"name":"(anonymous_15)","decl":{"start":{"line":107,"column":4},"end":{"line":107,"column":5}},"loc":{"start":{"line":107,"column":16},"end":{"line":131,"column":5}},"line":107},"16":{"name":"(anonymous_16)","decl":{"start":{"line":108,"column":25},"end":{"line":108,"column":26}},"loc":{"start":{"line":108,"column":46},"end":{"line":130,"column":7}},"line":108},"17":{"name":"(anonymous_17)","decl":{"start":{"line":109,"column":33},"end":{"line":109,"column":34}},"loc":{"start":{"line":109,"column":62},"end":{"line":129,"column":9}},"line":109},"18":{"name":"(anonymous_18)","decl":{"start":{"line":120,"column":31},"end":{"line":120,"column":32}},"loc":{"start":{"line":120,"column":37},"end":{"line":123,"column":11}},"line":120},"19":{"name":"(anonymous_19)","decl":{"start":{"line":125,"column":31},"end":{"line":125,"column":32}},"loc":{"start":{"line":125,"column":37},"end":{"line":128,"column":11}},"line":125},"20":{"name":"(anonymous_20)","decl":{"start":{"line":137,"column":4},"end":{"line":137,"column":5}},"loc":{"start":{"line":137,"column":35},"end":{"line":151,"column":5}},"line":137},"21":{"name":"(anonymous_21)","decl":{"start":{"line":158,"column":4},"end":{"line":158,"column":5}},"loc":{"start":{"line":158,"column":33},"end":{"line":178,"column":5}},"line":158},"22":{"name":"(anonymous_22)","decl":{"start":{"line":159,"column":39},"end":{"line":159,"column":40}},"loc":{"start":{"line":159,"column":57},"end":{"line":177,"column":7}},"line":159},"23":{"name":"(anonymous_23)","decl":{"start":{"line":182,"column":32},"end":{"line":182,"column":33}},"loc":{"start":{"line":182,"column":41},"end":{"line":186,"column":3}},"line":182}},"branchMap":{"0":{"loc":{"start":{"line":16,"column":2},"end":{"line":19,"column":3}},"type":"if","locations":[{"start":{"line":16,"column":2},"end":{"line":19,"column":3}},{"start":{"line":16,"column":2},"end":{"line":19,"column":3}}],"line":16},"1":{"loc":{"start":{"line":55,"column":13},"end":{"line":55,"column":55}},"type":"binary-expr","locations":[{"start":{"line":55,"column":13},"end":{"line":55,"column":16}},{"start":{"line":55,"column":20},"end":{"line":55,"column":55}}],"line":55},"2":{"loc":{"start":{"line":88,"column":10},"end":{"line":88,"column":33}},"type":"if","locations":[{"start":{"line":88,"column":10},"end":{"line":88,"column":33}},{"start":{"line":88,"column":10},"end":{"line":88,"column":33}}],"line":88},"3":{"loc":{"start":{"line":98,"column":49},"end":{"line":98,"column":93}},"type":"binary-expr","locations":[{"start":{"line":98,"column":49},"end":{"line":98,"column":55}},{"start":{"line":98,"column":59},"end":{"line":98,"column":93}}],"line":98},"4":{"loc":{"start":{"line":112,"column":10},"end":{"line":114,"column":11}},"type":"if","locations":[{"start":{"line":112,"column":10},"end":{"line":114,"column":11}},{"start":{"line":112,"column":10},"end":{"line":114,"column":11}}],"line":112},"5":{"loc":{"start":{"line":116,"column":10},"end":{"line":118,"column":11}},"type":"if","locations":[{"start":{"line":116,"column":10},"end":{"line":118,"column":11}},{"start":{"line":116,"column":10},"end":{"line":118,"column":11}}],"line":116},"6":{"loc":{"start":{"line":145,"column":8},"end":{"line":147,"column":9}},"type":"if","locations":[{"start":{"line":145,"column":8},"end":{"line":147,"column":9}},{"start":{"line":145,"column":8},"end":{"line":147,"column":9}}],"line":145},"7":{"loc":{"start":{"line":171,"column":10},"end":{"line":173,"column":11}},"type":"if","locations":[{"start":{"line":171,"column":10},"end":{"line":173,"column":11}},{"start":{"line":171,"column":10},"end":{"line":173,"column":11}}],"line":171},"8":{"loc":{"start":{"line":183,"column":4},"end":{"line":185,"column":5}},"type":"if","locations":[{"start":{"line":183,"column":4},"end":{"line":185,"column":5}},{"start":{"line":183,"column":4},"end":{"line":185,"column":5}}],"line":183}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":2,"6":0,"7":0,"8":2,"9":2,"10":2,"11":2,"12":2,"13":4,"14":3,"15":3,"16":3,"17":3,"18":1,"19":1,"20":5,"21":5,"22":5,"23":5,"24":0,"25":5,"26":1,"27":1,"28":1,"29":1,"30":16,"31":16,"32":16,"33":0,"34":16,"35":16,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":16,"43":16,"44":16,"45":16,"46":16,"47":16,"48":6,"49":6,"50":6,"51":6,"52":6,"53":6,"54":6,"55":6,"56":6,"57":6,"58":1,"59":5,"60":2,"61":22,"62":20,"63":2,"64":1},"f":{"0":2,"1":4,"2":3,"3":3,"4":3,"5":1,"6":1,"7":5,"8":5,"9":5,"10":5,"11":1,"12":1,"13":1,"14":1,"15":16,"16":16,"17":16,"18":0,"19":0,"20":16,"21":6,"22":6,"23":22},"b":{"0":[0,2],"1":[3,3],"2":[0,5],"3":[1,1],"4":[0,16],"5":[16,0],"6":[16,0],"7":[1,5],"8":[20,2]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"c64dc92b3720f9473862582996246a8e21026a6f","contentHash":"79d27607cea2005a0216e1026003e15c8da17963185c605c00d386175ab6fb6d"}}
|