(func: Function | string, items: any[])
| 204 | } |
| 205 | |
| 206 | static deleteItems(func: Function | string, items: any[]): number { |
| 207 | const hashes = Cache.getItemsHashes(func, items); |
| 208 | const fnName = getFnName(func); |
| 209 | const paths = hashes.map(r => path.join(Cache.cacheDirectory, fnName, `${r}.json`)); |
| 210 | _deleteItems(paths); |
| 211 | return hashes.length; |
| 212 | } |
| 213 | |
| 214 | static clear(func?: Function | string): void { |
| 215 | if (func !== undefined) { |
no test coverage detected