mirror of
https://github.com/coaidev/coai.git
synced 2025-05-20 05:20:15 +09:00
update cache
This commit is contained in:
parent
40a407ec4a
commit
6b37bc13b9
@ -5,6 +5,9 @@ import "./conf.ts";
|
||||
import "./i18n.ts";
|
||||
import "./assets/main.less";
|
||||
import "./assets/globals.less";
|
||||
import {version} from "./conf.ts";
|
||||
|
||||
console.debug(`chatnio application (version: ${version})`);
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root")!).render(
|
||||
<React.StrictMode>
|
||||
|
@ -39,7 +39,7 @@ export default defineConfig({
|
||||
skipWaiting: true,
|
||||
clientsClaim: true,
|
||||
runtimeCaching: [{
|
||||
urlPattern: new RegExp('^https://fonts.(?:googleapis|gstatic).com/(.*)'),
|
||||
urlPattern: new RegExp('^https://fonts.googlefonts.cn/(.*)'),
|
||||
handler: 'CacheFirst',
|
||||
options: {
|
||||
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)$/,
|
||||
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