• Resolved garrettm30

    (@garrettm30)


    I was very excited to find your plugin after I had enough with another plugin gaining even more bloat and requiring me to make some further compatibility changes on our site for the latest update to said plugin. Thank you for making your solution available.

    While I was going through testing all the changes we made to move over to your plugin, I discovered that page caching was disabled everywhere on frontend regardless of whether a download was involved. I tracked it down to the following line from inc/functions.core:244

    if (!defined('DONOTCACHEPAGE')) define('DONOTCACHEPAGE', true);

    In testing, I found setting the constant to false or removing the line resolved the caching problem.

    Since your function simple_download_counter_download_handler() runs on every frontend page and even some admin pages, I recommend trying to find a better way to define the constant only when a download is requested. For example, I tried moving the line inside of the if statement at line 268, and all seems well, though I am sure you could come up with something better since you know your own code.

    Thank you for considering this issue.

    In case you need to know, I am using the WP Rocket plugin for our page caching, and they do respect the DONOTCACHEPAGE constant (source: https://docs.wp-rocket.me/article/141-force-page-caching).

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeff Starr

    (@specialk)

    This is great feedback, thank you. I’ve got it on the list and will try to resolve the issue for the next plugin update.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up, this issue is resolved in the upcoming version of the plugin (SDC 1.7). Thanks again for reporting and tracking down the solution, much appreciated @garrettm30.

    Thread Starter garrettm30

    (@garrettm30)

    Thank you for fixing this issue. I am putting it through testing now as I move forward on transitioning to your good, simple plugin from another solution we have used for the past seven years that just gets more and more bloated over time.

    Plugin Author Jeff Starr

    (@specialk)

    You are very welcome. Thanks for reporting the issue, @garrettm30. Your feedback is valued and appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘DONOTCACHEPAGE Breaks Cache on Entire Site’ is closed to new replies.