Variable CacheStorageConst
CacheStorage: {
loadProfileConfig(profileId: string): Promise<Record<string, unknown>>;
loadLayerSelection(profileId: string): Promise<LayerSelection | null>;
saveLayerSelection(
profileId: string,
selection: LayerSelection,
): Promise<void>;
saveManifest(profileId: string, results: ManifestResults): Promise<void>;
getManifest(profileId: string): Promise<Record<string, unknown> | null>;
deleteManifest(profileId: string): Promise<void>;
getCacheStatus(profileId: string): Promise<Record<string, unknown> | null>;
getCachedProfiles(): Promise<string[]>;
getCachedUrls(profileId: string): Promise<Set<string>>;
clearCache(profileId: string): Promise<number>;
} = ...
Type Declaration
loadProfileConfig: function
loadProfileConfig(profileId: string): Promise<Record<string, unknown>> Returns Promise<Record<string, unknown>>
Profile configuration
loadLayerSelection: function
loadLayerSelection(profileId: string): Promise<LayerSelection | null> Returns Promise<LayerSelection | null>
Layer selection {layers: [], basemaps: [], layerStyles: {}, timestamp: number}
saveLayerSelection: function
saveLayerSelection(profileId: string, selection: LayerSelection): Promise<void> Parameters
- profileId: string
- selection: LayerSelection
layers
basemaps
layerStyles
Returns Promise<void>
saveManifest: function
saveManifest(profileId: string, results: ManifestResults): Promise<void> Parameters
- profileId: string
- results: ManifestResults
cached
failed
totalSize
resourcesCount
duration
Returns Promise<void>
getManifest: function
getManifest(profileId: string): Promise<Record<string, unknown> | null> Returns Promise<Record<string, unknown> | null>
The manifest, or null when absent
deleteManifest: function
deleteManifest(profileId: string): Promise<void>
getCacheStatus: function
getCacheStatus(profileId: string): Promise<Record<string, unknown> | null> Returns Promise<Record<string, unknown> | null>
Cache status, or null when the profile is not cached
getCachedProfiles: function
getCachedProfiles(): Promise<string[]> Returns Promise<string[]>
IDs of the cached profiles
getCachedUrls: function
getCachedUrls(profileId: string): Promise<Set<string>> Returns Promise<Set<string>>
Set of cached URLs
clearCache: function
clearCache(profileId: string): Promise<number> Returns Promise<number>
Number of deleted resources
Loads a profile's configuration from its profile.json.