451-tools
Version:
Censorship resilient and distributed publishing: informed by the needs of publishers and their audiences, More Mirrors implements a set of offline fallback strategies for censorship resilient websites.
23 lines (22 loc) • 741 B
TypeScript
export function networkOnly({ event, fetcher }: {
event: any;
fetcher?: typeof fetch;
}): Promise<Response>;
export function networkFirst({ cacheName, event, expirationManager, fetcher, }: {
cacheName: any;
event: any;
expirationManager: any;
fetcher?: typeof fetch;
}): Promise<Response>;
export function staleWhileRevalidate({ cacheName, event, expirationManager, fetcher, }: {
cacheName: any;
event: any;
expirationManager: any;
fetcher?: typeof fetch;
}): Promise<Response>;
export const AVAILABLE_STRATEGIES: string[];
export const FETCH_STRATEGIES: {
'network-only': typeof networkOnly;
'network-first': typeof networkFirst;
'stale-while-revalidate': typeof staleWhileRevalidate;
};