Skip to content
Snippets Groups Projects
Commit 51bce90c authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'redmine-issues/13321' into 'develop'

REDMINE_ISSUE-13321

See merge request !312
parents f3a69857 60c92716
Branches
Tags
2 merge requests!424version 3.1.0,!312REDMINE_ISSUE-13321
......@@ -29,10 +29,15 @@ if (workbox) {
new RegExp('.*/api/.*'),
new workbox.strategies.NetworkFirst({
cacheName: 'api',
plugins: [
new workbox.cacheableResponse.Plugin({
statuses: [0, 200],
}),
],
})
);
workbox.routing.registerRoute(
/^https:\/\/c\.tile\.openstreetmap\.fr/,
/^https:\/\/[a-zA-Z]\.tile\.openstreetmap\.fr/,
new workbox.strategies.CacheFirst({
cacheName: 'osm',
plugins: [
......@@ -46,6 +51,21 @@ if (workbox) {
],
})
);
workbox.routing.registerRoute(
/^https:\/\/osm\.geo2france\.fr\/mapcache/,
new workbox.strategies.CacheFirst({
cacheName: 'mapcache',
plugins: [
new workbox.cacheableResponse.Plugin({
statuses: [0, 200],
}),
new workbox.expiration.Plugin({
maxAgeSeconds: 60 * 60 * 24 * 365,
// maxEntries: 30, pour limiter le nombre d'entrée dans le cache
}),
],
})
);
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment