NO! Check your plugins and compair plugin names with directory names in /wp-content/plugins if there is a directory where you can’t see the plugin in Admin.
Thread Starter
hagenb
(@hagenb)
Ok I will check. Thank you.
Thread Starter
hagenb
(@hagenb)
This is the only thing I could find that is related to 86400. Its part of the Woolentor plugin. But even if I disable the plugin I still see the cache-control: public,max-age=86400. I downloaded all the plugins and searched for 86400 and I found this:
// Set cookie or save user meta
$cookie_duration = 5;
$cookie_duration = time() + (86400 * $cookie_duration);
if ( $user_id ) {
update_user_meta( $user_id, $cookie_name, $products_list );
} else {
setcookie( $cookie_name, serialize( $products_list ), $cookie_duration, COOKIEPATH, COOKIE_DOMAIN, false, true );
}
Did you purge the cache after you have disabled the Woolentor plugin?
Okay, the main thing is that we know what the problem is. However, it is up to you to find out what causes this error. From a distance my hands are tied, sorry. Until you find the error, please use the code below. This code defines the default configuration of any PHP application, including WordPress. This means that the mentioned feature of the LiteSpeed web server is retained. It should actually at least overwrite the problem.
<FilesMatch "\.(php|PHP)$">
Header set Cache-Control "private,max-age=0,must-revalidate"
</FilesMatch>
Thread Starter
hagenb
(@hagenb)
This code defines the default configuration of any PHP application, including WordPress. This means that the mentioned feature of the LiteSpeed web server is retained. It should actually at least overwrite the problem.
Thank you. It looks like I will have to keep this indefinitely as I can’t find what is setting it. I downloaded all my plugins and went through them one-by-one and I could not find what was causing it.
The only thing I could find is the following, but disabling the plugin and “Purge All” did not fix it:
public function render_proxy_page() {
$proxy_options = $this->determine_proxy_options();
if ( $proxy_options === [] ) {
// Do not accept any other file than implemented.
$this->set_header( 'HTTP/1.0 501 Requested file not implemented' );
return;
}
// Set the headers before serving the remote file.
$this->set_header( 'Content-Type: ' . $proxy_options['content_type'] );
$this->set_header( 'Cache-Control: max-age=' . self::CACHE_CONTROL_MAX_AGE );
try {
echo $this->get_remote_url_body( $proxy_options['url'] );
}
catch ( Exception $e ) {
/*
* Reset the file headers because the loading failed.
*
* Note: Due to supporting PHP 5.2 header_remove can not be used here.
* Overwrite the headers instead.
*/
$this->set_header( 'Content-Type: text/plain' );
$this->set_header( 'Cache-Control: max-age=0' );
$this->set_header( 'HTTP/1.0 500 ' . $e->getMessage() );
}
}
The CACHE_CONTROL_MAX_AGE is DAY_IN_SECONDS which is 86400 seconds..
Beside the above, there is nothing I could find.
Where did you find this constant? In any plugin? CACHE_CONTROL_MAX_AGE
Thread Starter
hagenb
(@hagenb)
Yes it was in the plugins “Yoast SEO” folder in a file called class-my-yoast-proxy.php.
The CACHE_CONTROL_MAX_AGE is DAY_IN_SECONDS which is 86400 seconds
Where did you find the value 86400?
Thread Starter
hagenb
(@hagenb)
It’s in the class-my-yoast-proxy.php file line 28 : const CACHE_CONTROL_MAX_AGE = DAY_IN_SECONDS;
I asked you for the value and not the constant name. 😉
Thread Starter
hagenb
(@hagenb)
oohhhh.. There is 86400 seconds in a day, so whatever is setting cache-control: public,max-age=864000 sets it for a day.. I hope that is what you meant 😉
EDIT: The constant is set in what I posted above $this->set_header( 'Cache-Control: max-age=' . self::CACHE_CONTROL_MAX_AGE );
-
This reply was modified 3 years, 4 months ago by
hagenb.
Yes, that want I meant, But how do you conclude that DAY_IN_SECONDS = 86400?