(object: CacheableValue)
| 136 | } |
| 137 | |
| 138 | async cacheGet(object: CacheableValue) { |
| 139 | const result = await this.cache.get(BaseCache.hash(object)); |
| 140 | if (this.cache.gets % this.reportCacheEvery === 0) { |
| 141 | this.cache.report(); |
| 142 | } |
| 143 | if (!result.hit) return null; |
| 144 | return JSON.parse(unwrap(result.data).toString()); |
| 145 | } |
| 146 | |
| 147 | async cachePut(object: CacheableValue, result: object, creator: string | undefined) { |
| 148 | const key = BaseCache.hash(object); |