Address @matsjla's awesome comments

This commit is contained in:
Matt Godbolt
2022-04-29 15:23:41 -05:00
parent 3906e50d55
commit 2d7dc31ceb
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ export abstract class BaseCache implements Cache {
hits: number;
protected countersEnabled: boolean;
protected constructor(cacheName, details, type) {
protected constructor(cacheName: string, details: string, type: string) {
this.cacheName = cacheName;
this.details = details;
this.type = type;
@@ -77,7 +77,7 @@ export abstract class BaseCache implements Cache {
logger.info(`${this.cacheName} ${this.details}: cache stats: ${this.statString()}`);
}
static hash(object): string {
static hash(object: any): string {
return getHash(object, HashVersion);
}
+1 -1
View File
@@ -44,7 +44,7 @@ export class InMemoryCache extends BaseCache {
return `${super.statString()}, LRU has ${this.cache.itemCount} item(s) totalling ${this.cache.length} bytes`;
}
override async getInternal(key): Promise<GetResult> {
override async getInternal(key: string): Promise<GetResult> {
const cached = this.cache.get(key);
return {hit: !!cached, data: cached};
}
+1 -1
View File
@@ -54,7 +54,7 @@ export class S3Cache extends BaseCache {
});
}
override async getInternal(key): Promise<GetResult> {
override async getInternal(key: string): Promise<GetResult> {
try {
return await this.s3.get(key, this.path);
} catch (e) {