Object that stores injectables
AnnotatedCacheStorage for interface definition
import { AnnotatedCacheStorage, CacheStorage } from "@fork-git-it/annotatedjs";
@CacheStorage()
export class ExampleCacheStorage implements AnnotatedCacheStorage {
has(cacheName: string) {
// caches is the global CacheStorage in browser runtimes
return caches.has(cacheName);
}
open(cacheName: string) {
return caches.open(cacheName);
}
delete(cacheName: string) {
return caches.delete(cacheName);
}
}
Generated using TypeDoc
A class decorator that defines the global cache store