sulu / SuluHeadlessBundle

Bundle that provides controllers and services for using Sulu as headless content management system
MIT License
45 stars 25 forks source link

Add cache-control directive to snippet & navigation endpoints #107

Closed tmarly closed 2 years ago

tmarly commented 2 years ago

The HeadlessWebsiteController adds cache-control directives. This commit add cache-control for snippet and navigation headless controllers.

It's rather simple, I initially tried to use the CacheLifetimeEnhancer but the code is much more complex (cf. attached patch). alternative-with-enhancer.txt

wachterjohannes commented 2 years ago

@tmarly thanks for the contribution.

wachterjohannes commented 2 years ago

i have also added a issue for cache invalidation https://github.com/sulu/SuluHeadlessBundle/issues/108 but thats not part of this PR

Prokyonn commented 2 years ago

Closed in favour of https://github.com/sulu/SuluHeadlessBundle/pull/112 Thanks a lot for your contribution 😊