Merge pull request #188 from Skillz4Killz/add-size

Add size() to cacheHandlers
This commit is contained in:
Skillz4Killz
2020-11-14 08:11:48 -05:00
committed by GitHub

View File

@@ -93,6 +93,11 @@ export let cacheHandlers = {
return cache[table].has(key);
},
/** Get the number of key-value pairs */
size: (table: TableName) => {
return cache[table].size;
},
// Done differently to have overloads
/** Add a key value pair to the cache */
set,