You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am familiar with displaying additional content for certain users by using
{% if (authorize(['site.foo'])) %}
<h1>Hello World!<h2>
{% endif %}
However when twig caching is enabled, this approach does not work, as the same last cached version of the page is showed to both authorized and normal users.
How should I tackle this issue or is it possible to exclude certain parts of a page from caching?
PS: I temporally use a "never cache twig" option, but the TTFB (time to first byte) is more than doubled.
The text was updated successfully, but these errors were encountered:
otahirs
changed the title
display additional page content for authorized users only - with caching enabled
Display additional page content for authorized users only - with caching enabled
Feb 20, 2019
Right now there's no other option than to disable caching from the whole page. I have plans to allow dynamic sections inside a cached page, but it will still take some time to get everything that is required to make this to work in place. See: #1934
I am familiar with displaying additional content for certain users by using
However when twig caching is enabled, this approach does not work, as the same last cached version of the page is showed to both authorized and normal users.
How should I tackle this issue or is it possible to exclude certain parts of a page from caching?
PS: I temporally use a "never cache twig" option, but the TTFB (time to first byte) is more than doubled.
The text was updated successfully, but these errors were encountered: