I am having a problem with caching. I have closed pages for unauthorized users. These pages are cached. And it turns out that as soon as they get into the cache, they become available to everyone.
I would like to keep caching for closed pages, as they are quite “heavy”. Checking occurs in snippet init.php. Is it possible to disable caching in a snippet?
Page:
<?php snippet('init') ?>
<?php snippet('header') ?>
... content
<?php snippet('footer') ?>
and init.php
<?php
if(!$kirby->user())
go('login', 302);
?>