mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Add more purges and don't cache too long
This commit is contained in:
parent
f1e4ea2cfc
commit
f59058efa1
1 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,6 @@ const imageRoute = new Route(
|
|||
plugins: [
|
||||
new ExpirationPlugin({
|
||||
maxEntries: 50,
|
||||
maxAgeSeconds: 3 * 24 * 60 * 60, // 3 days
|
||||
purgeOnQuotaError: true,
|
||||
}),
|
||||
new CacheableResponsePlugin({
|
||||
|
@ -88,6 +87,7 @@ const apiExtendedRoute = new RegExpRoute(
|
|||
plugins: [
|
||||
new ExpirationPlugin({
|
||||
maxAgeSeconds: 24 * 60 * 60, // 1 day
|
||||
purgeOnQuotaError: true,
|
||||
}),
|
||||
new CacheableResponsePlugin({
|
||||
statuses: [0, 200],
|
||||
|
@ -129,6 +129,7 @@ const apiRoute = new RegExpRoute(
|
|||
plugins: [
|
||||
new ExpirationPlugin({
|
||||
maxAgeSeconds: 5 * 60, // 5 minutes
|
||||
purgeOnQuotaError: true,
|
||||
}),
|
||||
new CacheableResponsePlugin({
|
||||
statuses: [0, 200],
|
||||
|
|
Loading…
Reference in a new issue