Built in page cache ignore issue


#1

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.


#2

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


#3

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

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

#4

Yep, fixed it.