You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.
The cache doesn't return the updated data.
I used the default memory cache and following is my cache config in/config/middleware.js
cache: {
enabled: true,
enableEtagSupport: true,
enableXCacheHeaders: true,
withKoaContext: true,
withStrapiMiddleware: true,
clearRelatedCache: true,
maxAge: 3.154e10,
models: [
{
model: 'sqore-posts',
hitpass: false,
singleType: true,
routes: ['/sqore-posts/:slug', '/sqore-posts'],
},
],
},
After updating the content, updated data is not from API and only old cache data when calling /sqore-posts/:slug.
So I tried to clear or update the cache of model "sqore-posts" in the sqore-posts model.
but I don't know how to clear or update the cache.
I used this code in /models/sqore-posts.js.
The cache doesn't return the updated data.
I used the default memory cache and following is my cache config in/config/middleware.js
cache: {
enabled: true,
enableEtagSupport: true,
enableXCacheHeaders: true,
withKoaContext: true,
withStrapiMiddleware: true,
clearRelatedCache: true,
maxAge: 3.154e10,
models: [
{
model: 'sqore-posts',
hitpass: false,
singleType: true,
routes: ['/sqore-posts/:slug', '/sqore-posts'],
},
],
},
After updating the content, updated data is not from API and only old cache data when calling /sqore-posts/:slug.
So I tried to clear or update the cache of model "sqore-posts" in the sqore-posts model.
but I don't know how to clear or update the cache.
I used this code in /models/sqore-posts.js.
I am looking for your help.
Thanks.
The text was updated successfully, but these errors were encountered: