render: {
// Setting up cache for 'static' directory - a year in milliseconds
// https://web.dev/uses-long-cache-ttl
static: {
maxAge: 60 * 60 * 24 * 365 * 1000,
},
},
static: false;
。 - user5589998app.yaml
文件中的handlers.expiration
参数:handlers:
- url: /_nuxt
static_dir: .nuxt/dist/client
expiration: 4d 5h
secure: always
或者,如果您想全局配置它,请在根级别设置 default_expiration
参数:
default_expiration: 4d 5h
允许使用d
(天)、h
(时)、m
(分)和s
(秒)。这是文档。