Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.
ReferenceAPI ReferenceLibraryServicesCacheURL Fetch Cache

web


web / lib/services/cache/url-fetch-cache

lib/services/cache/url-fetch-cache

URL fetch cache for scheduled imports.

Caches HTTP responses from external URLs with support for ETags, conditional requests, and Cache-Control directives. Works directly with buffers instead of Response objects to avoid complexity of Response body handling in Node.js.

Classes

UrlFetchCache

Constructors

Constructor

new UrlFetchCache(): UrlFetchCache

Returns

UrlFetchCache

Methods

fetch()

fetch(url, options?): Promise<CachedResponse>

Fetch with caching support including ETags and conditional requests

Parameters
url

string

options?

RequestInit & object

Returns

Promise<CachedResponse>

clear()

clear(): Promise<number>

Returns

Promise<number>

cleanup()

cleanup(): Promise<number>

Returns

Promise<number>

getStats()

getStats(): Promise<CacheStats>

Returns

Promise<CacheStats>

invalidateForUser()

invalidateForUser(userId): Promise<void>

Invalidate all cached entries for a specific user

Parameters
userId

string

Returns

Promise<void>

Functions

getUrlFetchCache()

getUrlFetchCache(): UrlFetchCache

Returns

UrlFetchCache

Last updated on