mirror of
https://github.com/coaidev/coai.git
synced 2025-05-21 22:10:12 +09:00
update cache
This commit is contained in:
parent
40a407ec4a
commit
6b37bc13b9
@ -5,6 +5,9 @@ import "./conf.ts";
|
|||||||
import "./i18n.ts";
|
import "./i18n.ts";
|
||||||
import "./assets/main.less";
|
import "./assets/main.less";
|
||||||
import "./assets/globals.less";
|
import "./assets/globals.less";
|
||||||
|
import {version} from "./conf.ts";
|
||||||
|
|
||||||
|
console.debug(`chatnio application (version: ${version})`);
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
|
@ -39,7 +39,7 @@ export default defineConfig({
|
|||||||
skipWaiting: true,
|
skipWaiting: true,
|
||||||
clientsClaim: true,
|
clientsClaim: true,
|
||||||
runtimeCaching: [{
|
runtimeCaching: [{
|
||||||
urlPattern: new RegExp('^https://fonts.(?:googleapis|gstatic).com/(.*)'),
|
urlPattern: new RegExp('^https://fonts.googlefonts.cn/(.*)'),
|
||||||
handler: 'CacheFirst',
|
handler: 'CacheFirst',
|
||||||
options: {
|
options: {
|
||||||
cacheName: 'google-fonts',
|
cacheName: 'google-fonts',
|
||||||
@ -48,6 +48,16 @@ export default defineConfig({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
urlPattern: new RegExp('https://cdn.zmh-program.site/(.*)'),
|
||||||
|
handler: 'CacheFirst',
|
||||||
|
options: {
|
||||||
|
cacheName: 'cdn',
|
||||||
|
expiration: {
|
||||||
|
maxEntries: 3600,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
urlPattern: /\.(?:png|gif|jpg|jpeg|svg|webp)$/,
|
urlPattern: /\.(?:png|gif|jpg|jpeg|svg|webp)$/,
|
||||||
handler: 'CacheFirst',
|
handler: 'CacheFirst',
|
||||||
|
1
utils/cache.go
Normal file
1
utils/cache.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package utils
|
Loading…
Reference in New Issue
Block a user