mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
18 lines
414 B
TypeScript
18 lines
414 B
TypeScript
/*
|
|
import {registerRoute} from 'workbox-routing';
|
|
import {CacheFirst} from 'workbox-strategies';
|
|
import {CacheableResponsePlugin} from 'workbox-cacheable-response';
|
|
|
|
registerRoute(
|
|
({url}) => url.pathname.endsWith('pbf'),
|
|
new CacheFirst({
|
|
cacheName: 'pbf-cache',
|
|
plugins: [
|
|
new CacheableResponsePlugin({
|
|
statuses: [0, 200],
|
|
})
|
|
]
|
|
})
|
|
);
|
|
*/
|