Comment in code says:
Test for the page_cache module, which is required for cache invalidation.

This is not valid. Page cache module is not needed when having an external caching solution.

Warning says on status page:
Please install the page_cache module. The page cache acts as a 'second layer of defence' by keeping copies of all generated pages, which protects you from widespread performance degradation in case of emergencies.

This should be bad practice, caching a lot of objects that you do not need to cache, if, for instance, varnish has problems, this will not help at all in a high traffic situation. It could do things even worse, if using db for cache, also the warning could make devs believe that Page cache module is needed for make purging work.

Suggestion:
Remove PageCacheCheck.php

Comments

MiSc created an issue. See original summary.

misc’s picture

Issue summary: View changes
misc’s picture

StatusFileSize
new2.72 KB
wim leers’s picture

Title: Suggestion - remove PageCacheCheck » Suggestion - remove PageCacheCheck, or document its recommendation very clearly
Category: Feature request » Task
Priority: Minor » Normal

If the maintainer decides to keep this, then they should at least document very clearly/explicitly why they think this is necessary.

misc’s picture

Status: Active » Needs review
caspervoogt’s picture

I agree with this suggestion.

dragonwize’s picture

The description of the page_cache module in core even reads:

Caches pages for anonymous users. Use when an external page cache is not available.

moshe weitzman’s picture

+1 to removing this warning. Its a bit too opinionated IMO.

jjcarrion’s picture

Assigned: misc » Unassigned
StatusFileSize
new2.53 KB

Reroll to work with 3.0.0-beta9

gaëlg’s picture

Status: Needs review » Reviewed & tested by the community

If I understand well the guidelines (https://www.drupal.org/node/156119), it's RTBC, right?

mpp’s picture

RTBC++

"The page cache acts as a 'second layer of defence' by keeping copies of all generated pages, which protects you from widespread performance degradation in case of emergencies." => as mentioned in the issue description there's no use for page_cache when using an external cache.

lisa.rae’s picture

Status: Reviewed & tested by the community » Needs work

Marking Needs Work, patch is failing testing.

misc’s picture

It is not just the pull request that is falling testing, it is also the main main 8.x-3.x-dev that is failing:
https://www.drupal.org/pift-ci-job/1595419

jjcarrion’s picture

Status: Needs work » Needs review
StatusFileSize
new2.54 KB

Reroll to work with 3.0.0

mpp’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for the reroll, setting back to rtbc.

zero2one’s picture

RTBC

sime’s picture

page_cache is a really bad decision on some of my sites. So suggesting that administrators install purge is a big problem for me. :D
Could this get merged?

krzysztof domański’s picture

StatusFileSize
new2.54 KB

re-rolled, it was unnecessary, the same as previous patch.

japerry’s picture

Issue tags: +purge-3.1

I also support removing this unneeded check.

  • nielsvm committed b6b6ba5 on 8.x-3.x authored by MiSc
    Issue #2803607: Suggestion - remove PageCacheCheck, or document its...
nielsvm’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everybody, it is gone now due unpopular demand :-) :

https://www.drupal.org/project/purge/issues/3236847

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

murat_halici’s picture

Removal of PageCacheCheck in 8.x-3.1 is causing a fatal error in all of our sites due to cached plugins.

Uncaught exception 'Drupal\Component\Plugin\Exception\PluginException' with message 'Plugin (page_cache) instance class "Drupal\purge\Plugin\Purge\DiagnosticCheck\PageCacheCheck" does not exist.' in /mnt/www/html/cbappcontent/docroot/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php:97

Clearing caches resolves the issue. However, I was wondering if anyone knows of a way to prevent the error from occurring without having to do that.

ralphvdhoudt’s picture

Added a dummy page_cache plugin file to be used as a temporary patch when updating/deploying your code

Fixes:
Uncaught exception 'Drupal\Component\Plugin\Exception\PluginException' with message 'Plugin (page_cache) instance class "Drupal\purge\Plugin\Purge\DiagnosticCheck\PageCacheCheck" does not exist.' in /mnt/www/html/cbappcontent/docroot/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php:97

Patch is not intended to be included in the module itself