• Resolved ahirai

    (@ahirai)


    Hi,

    The Site Health section of WP recommends “Persistent object caching is not enabled – The AMP plugin performs at its best when persistent object cache is enabled. Object caching is used to more effectively store image dimensions and parsed CSS.”

    I brought this up with my hosting company and here was their reply:

    “For the managed WordPress hosting accounts, those unfortunately do not support setting up persistent object caches. That said, the Varnish cache setup there does generally replace the need for that. Assuming Varnish already has a fresh copy of the output, the site code doesn’t need to run again for the next visitor. The persistent object store could speed up the site code running, but won’t impact serving content out of the Varnish cache.

    “On a regular VPS or Dedicated Server hosting account here (not WordPress specific), you can run custom persistent object cache daemons like Redis or memcached. The regular hosting account won’t have the Varnish cache set up though, so moving to that kind of setup would likely be counterproductive.”

    So it seems like my Nginx server running the Varnish cache eliminates the need for a “Persistent Object Cache”.

    In a future release, is there a way to have the AMP plugin to detect whether or not Varnish is running so that this warning/recommendation is suppressed? Or maybe adding a toggle in the settings so that I can suppress this warning/recommendation?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Milind More

    (@milindmore22)

    Hello @ahirai

    Thank you for the suggestion, It’s a recommendation from the AMP plugin to use Persistent object caching and not a requirement to run AMP plugin.

    Yes, I agree with your hosting provider if you are using varnish caching you don’t need persistent object caching.

    I will check with devs and see if we can suppress that warning for varnish users in future release

    Plugin Author Weston Ruter

    (@westonruter)

    Even though page caching like Varnish does reduce the need for persistent object caching, it is still recommended because it reduces the amount of data that is put into the wp_options database table (from transients).

    One feature we’re going to be including in the next version (v2.2) is detection for whether or not page caching is enabled via a new Site Health test. See amp-wp#4386.

    So a compromise I see here is that when we detect page caching is enabled, we can reduce the severity of not having persistent object caching from the current recommended status to something lesser. I suppose the only option there is good, which isn’t technically right but I guess it’s as good as we can get, but we can differentiate between the two with a color difference (green for actual good, and blue for info). There could be three states for this test then:

    1. recommended w/ orange: “Persistent object caching is not enabled”
    2. good w/ green: “Persistent object caching is enabled”
    3. good w/ blue: “Persistent object caching is not enabled, but you have page caching.”

    The latter two would both be included among “passed tests”.

    How does that sound?

    Note you can also remove site health tests with PHP filters. There’s a Site Health Tool Manager plugin which allows you to disable certain tests, although it has become a bit out of date.

    Thread Starter ahirai

    (@ahirai)

    If you’re asking me, I think this sounds like a fine compromise. Thanks for consideration to such a minor issue!

    Plugin Author Weston Ruter

    (@westonruter)

    I’ve implemented this as part of this pull request: https://github.com/ampproject/amp-wp/pull/6456

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Turn off Persistent Object Cache notification’ is closed to new replies.