Built in page cache ignore issue

I cant seem to get the built in pages cache to work with ignore. The ignore option seems to ignore everything:

'cache' => [
    'pages' => [
      'active' => true,
      'ignore' => function ($page) {
        return $page->autoid()->value() !== 'qpjllbol';

If i take the ignore out, all the pages end up in the cache as expected. I am trying to exclude a certain page because it has a Uniform powered contact form on it.

If qpjllbol is the page you want to ignore, it should be === not !==.

Ah… i think perhaps the docs might need a tweak then since this didn’t work either…

return $page->title()->value() !== 'Hire Us';

Yep, fixed it.

1 Like