1
`CACHE_ENABLED` should not affect `CACHE_CONTROL_S_MAXAGE`
Source: directus/directus#24887 · opened by @viters
Describe the Bug
If I define CACHE_CONTROL_S_MAXAGE > 0 and set CACHE_ENABLED = false, Cache-Control header is set to no-cache. In my opinion I should be able to set s-maxage without enabling Directus internal cache system.
The workaround now is to create a hook that would modify Cache-Control before response is sent.
Expected behavior
CACHE_CONTROL_S_MAXAGE = 600 and CACHE_ENABLED = false should result in response with header Cache-Control: (public/private same as CACHE_ENABLED=true), s-maxage=600.
Errors Shown
_No response_
What version of Directus are you using?
9.19.1
What version of Node.js are you using?
N/A
What database are you using?
N/A
What browser are you using?
N/A
How are you deploying Directus?
N/A
If I define CACHE_CONTROL_S_MAXAGE > 0 and set CACHE_ENABLED = false, Cache-Control header is set to no-cache. In my opinion I should be able to set s-maxage without enabling Directus internal cache system.
The workaround now is to create a hook that would modify Cache-Control before response is sent.
Expected behavior
CACHE_CONTROL_S_MAXAGE = 600 and CACHE_ENABLED = false should result in response with header Cache-Control: (public/private same as CACHE_ENABLED=true), s-maxage=600.
Errors Shown
_No response_
What version of Directus are you using?
9.19.1
What version of Node.js are you using?
N/A
What database are you using?
N/A
What browser are you using?
N/A
How are you deploying Directus?
N/A
No pledges yet. Be the first to back this.
Comments
Similar requests
API Cache doesn't respect custom headers
1 vote · 0 comments
Read data from directus_system collections in flows
4 votes · 0 comments
Customizable Display Interface for O2M Relation Selection
5 votes · 0 comments
Allow the user to set the vertical order of manual Flow buttons in the side bar.
3 votes · 0 comments
Pass selected items to a flow in a detail item page
2 votes · 0 comments
No comments yet.