Merge pull request #21 from Spythere/development

Wersja 1.8.2
This commit is contained in:
Spythere
2024-03-08 16:55:16 +01:00
committed by GitHub
2 changed files with 18 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "pojazdownik",
"version": "1.8.1",
"version": "1.8.2",
"private": true,
"type": "module",
"scripts": {
+17 -3
View File
@@ -24,7 +24,7 @@ export default defineConfig({
runtimeCaching: [
{
urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i,
handler: 'NetworkFirst',
handler: 'CacheFirst',
options: {
cacheName: 'swdr-images-cache',
expiration: {
@@ -37,10 +37,24 @@ export default defineConfig({
},
},
{
urlPattern: /^https:\/\/spythere.github.io\/api\/td2\/.*/i,
urlPattern: /^https:\/\/spythere.github.io\/api\/td2\/data\/.*/i,
handler: 'NetworkFirst',
options: {
cacheName: 'spythere-api-cache',
cacheName: 'spythere-api-data-cache',
expiration: {
maxEntries: 150,
maxAgeSeconds: 60 * 60 * 24, // <== 1 day
},
cacheableResponse: {
statuses: [0, 200],
},
},
},
{
urlPattern: /^https:\/\/spythere.github.io\/api\/td2\/images\/.*/i,
handler: 'CacheFirst',
options: {
cacheName: 'spythere-api-images-cache',
expiration: {
maxEntries: 150,
maxAgeSeconds: 60 * 60 * 24, // <== 1 day