-
-
Notifications
You must be signed in to change notification settings - Fork 56
Description
As pointed out in other issues already, the caching system still needs a lot of love. We are making good progress but there are still a lot of things to do to make Contao become the CMS with the best native caching support out there. We should not forget that our requirements are very complex and it will remain an ongoing topic that will accompany us for another few versions of Contao.
This issue should serve as a central place to keep track of all the TODO's around the HTTP cache.
Bugfixes
-
For Contao versions 4.4 and 4.5, we must force
public
responses even though the session was started (see [RTM] Do not make the response private when saving the session #1388). @leofeyer -
The Symfony
ResponseCacheStrategy
does not differentiate betweenprivate
responses andno-cache
cache headers. We must provide a PR to fix that. ([HttpKernel] Correctly merging cache directives in HttpCache/ResponseCacheStrategy symfony/symfony#26532) @aschempp -
Our
InsertTagsController
must setmax-age
(client cache) settings based on page settings for BC insert tags (see Make sure insert tags get the same client cache time as the page #1390). @Toflar -
FrontendTemplate::addCacheHeadersToResponse()
must be fixed because it only setsprivate
. Theno-cache
stuff is missing. @leofeyer
Features
-
We must ensure, we're not starting the session if we don't need it. Starting the session implicitly means that a response is
private
and may not be cached as it may contain personal information. As long as the core still requires stuff like this, we need to forcepublic
responses.-
$_SESSION['FORM_DATA']
is a real killer here because we never unset the information stored in that value. We must introduce a config option in the form settings to disable that (or enable explicitly). It should be removed in version 5. -
hasPreviousSession()
should be added everywhere we access the session to make sure the session is not started if there's no cookie (Input
class) (Only start the session if needed to find data in FORM_DATA #1471) @Toflar
-
-
We need insert tags as fragments so every insert tag can decide for its own, how it would like to be rendered (and set the correct caching headers) ([RFC] InsertTags as fragments #1470) @Toflar
-
Add support for tagging responses so that we can cache stuff "forever" and invalidate using cache tags. (Use toflar/psr6-symfony-http-cache-store manager-bundle#60) @Toflar