Skip to content

Commit

Permalink
Added has method (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Oct 8, 2024
1 parent 0a819c7 commit 96f9374
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/services/cache/CacheByUrlService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export class CacheByUrlService<TValue> implements ICacheService<URL, TValue> {
return this._promiseMap.get(url)!;
};

has = (url: URL): boolean => this._promiseMap.has(url);

invalidate = (url: URL): void => {
this._promiseMap.delete(url);
};
Expand Down

0 comments on commit 96f9374

Please sign in to comment.