rewe-digital / composer

Dynamically composes markup generated by microservices. Based on Java8, reactive patterns and Spotify Apollo. Made with 💙 in cologne.
Apache License 2.0
10 stars 2 forks source link

Propagate cache header and if none present add sane defaults #3

Closed AndreasKl closed 5 years ago

AndreasKl commented 6 years ago

When a master-template service decides to set Cache-Header he should be able to so. If the service did not set cache header at all, the composer should set sane defaults e.g. no caching. Otherwise things like browser back would return stall data.

thovid commented 6 years ago

I am not sure if we want to propagate the cache header of the template to the caller: If the template includes some content, it might be that the content is not cacheable at all.

Imho he cache headers we send to the caller must be some form of minimum of the cache headers of all contributing parts of the page.