Comments (11)
@jamieburchell We will look into adding more information on the settings page to inform users of the max value. You can override the max value by adding a definition for W3TC_CACHE_FILE_EXPIRE_MAX
in your wp-config.php
file.
from w3-total-cache.
Thanks @cssjoe. I did just that to resolve it.
Why is an upper limit necessary at all?
from w3-total-cache.
I also experience this problem. Page cache is set to a year, but when the cron "w3_pgcache_cleanup" runs, all cache is purged.
W3 Total Cache Version 2.7.1
from w3-total-cache.
Thanks @cssjoe !
You mention a further bug where a field is hidden when the cache is Disk (Enhanced). How does the value of that previously hidden field relate to the browser cache expiry value?
from w3-total-cache.
@jamieburchell Another one of our devs worked on #870 where the Page Cache lifetime setting was hidden but still used when using the Page Cache "Disk Enhanced" engine. There is a relation between the page cache lifetime and what is used for the browser cache Expires headers. We try to sync the lifetime so that browsers will get a new copy after the page cache expires.
from w3-total-cache.
@cssjoe So does the newly visible field override the value set for the browser cache lifetime in respect of the disk cache expiry?
from w3-total-cache.
@jamieburchell I was mistaken. The Browse Cache ExpiresByType
headers for pages are controlled by browsercache.html.expires
and browsercache.html.lifetime
.
from w3-total-cache.
@cssjoe Yes but browsercache.html.lifetime
was also used as the expiry for the disk cache files. Is that no longer the case?
from w3-total-cache.
@jamieburchell That code was written before I was a part of the project. It appears that browsercache.html.lifetime
is used for manual cleanup for Page Cache when using Disk Enhanced.
from w3-total-cache.
@cssjoe So one setting applies during cleanup but another controls expiry of the cache file? I'm confused 😊
from w3-total-cache.
@jamieburchell That code was written before I was a part of the project. It appears that
browsercache.html.lifetime
is used for manual cleanup for Page Cache when using Disk Enhanced.
@cssjoe Now that I see an input field for pgcache.lifetime
in the settings, I'm thinking this line should reference that rather than browsercache.html.lifetime
?
There's also something strange here a) the $_expire
property is never used in this class and b) it is inconsistent with how it is initialised elsewhere:
if ( !$this->_expire || $this->_expire > W3TC_CACHE_FILE_EXPIRE_MAX ) {
$this->_expire = W3TC_CACHE_FILE_EXPIRE_MAX;
}
if ( ! $this->_expire ) {
$this->_expire = 0;
} elseif ( $this->_expire > W3TC_CACHE_FILE_EXPIRE_MAX ) {
$this->_expire = W3TC_CACHE_FILE_EXPIRE_MAX;
}
if ( $expire <= 0 || $expire > W3TC_CACHE_FILE_EXPIRE_MAX )
$expire = W3TC_CACHE_FILE_EXPIRE_MAX;
from w3-total-cache.
Related Issues (20)
- Feature Request: add github repo link to the plugin support page HOT 1
- Bug: Page Cache (Disk Enhanced) - Folders not being deleted after I move WordPress from a sub folder HOT 2
- Cloudflare extension - some values cannot be changed
- Feature: Add Enable/Disable button in the dashboard HOT 1
- Proposal: database optimization capabilities like delete post revision HOT 1
- Handle XML and cache feeds settings
- When does w3-total-cache support pointing to pre-cache? HOT 1
- Redis testing function returns success for non existing server
- PHP Warning: tidy::parseString(): Unknown Tidy configuration option "browserCacheExtensions" in wp-content/plugins/w3-total-cache/lib/Minify/Minify/HTMLTidy.php on line 22
- Object cache is disabled but object-cache.php is placed in wp-content HOT 2
- Add MailChimp embed code for newsletter to footer HOT 1
- When will w3-total-cache support mouse pointer loading like wp-rocket? Not page caching. HOT 1
- Remove JS prompts in UI
- Managed Identity support for Azure Blob Storage integratation HOT 1
- Type-error in UserExperience_Remove_CssJs_Page_View.php HOT 2
- Server automatically updated to 2.7.3 and crashed deployment HOT 3
- Fatal error: Call to undefined function W3TCL\Minify\fpassthru() HOT 2
- Use CDN links on WordPress editor page?
- Add more "default" query strings keys to Page Cache HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from w3-total-cache.