Newbie caching questions

Hi! Just launching a large-ish Kirby site, and am sorting out caching.

Am i right in saying if I just implement this code block in my config:

return [
  'cache' => [
      'pages' => [
          'active' => true,
          'ignore' => function ($page) {
            return $page->title()->value() === 'Do not cache me';
          }
      ]
  ]
];

then my site is now being cached apart from the ignored pages? Do I need to set anything further? And will any changes via the panel clear the cache for that page?

Yes, that code will activate the pages file cache and ignore pages with the title “Do not cache me”. Since you will probably not have a page with such a title, nothing will be ignored…

The complete cache is cleared when you update your content via the Panel. Keep in mind that you have to manually clear the cache when you make any changes to your templates etc.

Thanks @pixelijn for the explanation, that is perfect

And one more thing to keep in mind: Don’t cache pages with forms…

Ah yes, thank you. I am using Uniform, and happily the docs mentioned that very thing!