-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
-
Empty show more show less
-
DevX 35, DevX 36, DevX 37
-
2
-
Yes
ResponseContentTypeVoter uses the extension of request if none set, it uses the Magnolia server default extension, so when using a delivery endpoint, it is not cached because in falls into:
/modules/cache/config/contentCaching/defaultPageCache/browserCachePolicy/policies/dontCachePages
resolves as html and sets the no cache headers.
code here:
String defaultExtension = ServerConfiguration.getInstance().getDefaultExtension();
in class info.magnolia.cms.beans.config.MIMEMapping
I guess fixing this issue will make many installations work in a different way
To reproduce just open this link https://demopublic.magnolia-cms.com/.rest/delivery/tours/v1
 ----------------------------------
Development decision :
Because ResponseContentTypeVoter was deprecated so we need to replace with RequestExtensionVoter which is a replacement for it (MGNLCACHE-290). And in order to make the class more configurable, we decided to add new flag named "emptyExtensionVote" to control this voter behavior in case of empty extension. Default value if not set is true (for backward compatibility). So in case of rest endpoint, if users want to cache it, they just need to add the flag to the dontCachePages voter and set its value to false.
- relates to
-
MGNLCACHE-188 Cache endpoint does not correctly set content-type on response
- Open
-
MGNLCACHE-290 Replace deprecated ResponseContentTypeVoter with RequestExtensionVoter
- Closed
-
MAGNOLIA-8908 DOC : introduce "emptyExtensionVote" flag for RequestExtensionVoter
- Closed
-
MAGNOLIA-8882 Replace ResponseContentTypeVoter as it was deprecated for a long time (6.3)
- Closed
- mentioned in
-
Page Loading...
1.
|
Implement | Completed | Chuong Doan Huy | |||||||||
2.
|
Review code | Completed | Milan Divilek | |||||||||
3.
|
Pre-int QA | Completed | Milan Divilek |
|
||||||||
4.
|
Final QA | Completed | Milan Divilek |