Cache page expiration appears broken
Permalink
I've been trying to play with cache settings to get the optimal performance out of a client web site. When I choose "Only when manually removed or the cache is cleared" for "Expire pages", it seems to have no effect. Steps I used to verify:
- Check the page as admin, there is no cached copy
- Visit the page from another web browser, not logged in
- Check the page as admin, there is now a cached copy, but it is set to expire in MINUTES
- Wait 2-3 minutes
- Check the page as admin, there is no cached copy
I also tried using the default of 6 hours. I got the same result. Basically, the cache expiration does not appear to be working.
What am I missing?
- Check the page as admin, there is no cached copy
- Visit the page from another web browser, not logged in
- Check the page as admin, there is now a cached copy, but it is set to expire in MINUTES
- Wait 2-3 minutes
- Check the page as admin, there is no cached copy
I also tried using the default of 6 hours. I got the same result. Basically, the cache expiration does not appear to be working.
What am I missing?
Thanks for the reply. Here are the DB values:
cCacheFullPageContent: -1
cCacheFullPageContentOverrideLifetime: 0
cCacheFullPageContentLifetimeCustom: 0
Looks like the pages all have the same values.
By overrides, do you mean am I overriding the cache settings on the individual page? If so, no. See attached screen shots of the global and page specific cache settings.
I've tried overriding locally on one page to see if it made any difference in the behavior, but it did not.
Here's my environment info:
# concrete5 Version
5.6.2.1
# concrete5 Packages
Destyle (1.1), Galleria image gallery (2.0), JamieAndSteve (1.0.0), Social Icons (1.2), Social Icons Reloaded (1.8).
# concrete5 Overrides
None
# Server Software
Apache
# Server API
cgi-fcgi
# PHP Version
5.4.20
# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mhash, mysql, mysqli, odbc, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.
# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 10M
sql.safe_mode - Off
upload_max_filesize - 10M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
cCacheFullPageContent: -1
cCacheFullPageContentOverrideLifetime: 0
cCacheFullPageContentLifetimeCustom: 0
Looks like the pages all have the same values.
By overrides, do you mean am I overriding the cache settings on the individual page? If so, no. See attached screen shots of the global and page specific cache settings.
I've tried overriding locally on one page to see if it made any difference in the behavior, but it did not.
Here's my environment info:
# concrete5 Version
5.6.2.1
# concrete5 Packages
Destyle (1.1), Galleria image gallery (2.0), JamieAndSteve (1.0.0), Social Icons (1.2), Social Icons Reloaded (1.8).
# concrete5 Overrides
None
# Server Software
Apache
# Server API
cgi-fcgi
# PHP Version
5.4.20
# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mhash, mysql, mysqli, odbc, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.
# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 10M
sql.safe_mode - Off
upload_max_filesize - 10M
ldap.max_links - Unlimited
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
If you change the cache settings for one page, within how many minutes does it expire? After the first load, does it say it will renew e.g. within 5 minutes, or one year? (one year is the max). And, what are the values in the Pages-table if you change the cache settings for that specific page?
With overrides I mean file overrides. Have you copied files from the core to your root folders to override code?
Also check table 'Config' and look for these values:
FULL_PAGE_CACHE_LIFETIME and FULL_PAGE_CACHE_LIFETIME_CUSTOM
What do you see?
With overrides I mean file overrides. Have you copied files from the core to your root folders to override code?
Also check table 'Config' and look for these values:
FULL_PAGE_CACHE_LIFETIME and FULL_PAGE_CACHE_LIFETIME_CUSTOM
What do you see?
>>With overrides I mean file overrides. Have you copied files from >>the core to your root folders to override code?
No.
I have to run out for a few hours. I'll look at the stuff you suggested when I return. I appreciate the help.
No.
I have to run out for a few hours. I'll look at the stuff you suggested when I return. I appreciate the help.
FULL_PAGE_CACHE_LIFETIME is set to "forever"
FULL_PAGE_CACHE_LIFETIME_CUSTOM is set to "null"
I'm really not sure how long it is taking for the cache to expire because the message printed seems incorrect.
>This page currently exists in the full page cache. It expires 11/24/2014 4:41 am.
The expiration time/date printed appears to be the time/date the cached page was created, plus one year.
Sometimes the cached page seems to disappear within minutes. It would really be helpful to have an accurate indication of when the system plans to expire the cached page. (Never expires should be so indicated.)
So here's an interesting twist. As of this morning, the page is still in the cache, but the message printed still indicates the page will expire one year from yesterday. I don't know what changed. The whole caching thing seems rather buggy to me.
Again, thanks for your help. At least I now know where to look in the DB when I make cache changes to see if the right values are changing.
FULL_PAGE_CACHE_LIFETIME_CUSTOM is set to "null"
I'm really not sure how long it is taking for the cache to expire because the message printed seems incorrect.
>This page currently exists in the full page cache. It expires 11/24/2014 4:41 am.
The expiration time/date printed appears to be the time/date the cached page was created, plus one year.
Sometimes the cached page seems to disappear within minutes. It would really be helpful to have an accurate indication of when the system plans to expire the cached page. (Never expires should be so indicated.)
So here's an interesting twist. As of this morning, the page is still in the cache, but the message printed still indicates the page will expire one year from yesterday. I don't know what changed. The whole caching thing seems rather buggy to me.
Again, thanks for your help. At least I now know where to look in the DB when I make cache changes to see if the right values are changing.
Alright. I just did a custom override on one page (not the front page) and set to expire in 60 minutes. The expire TDS on that cached entry is printing correctly. I'll check it in an hour and see if it expires properly.
I've tested many different configurations on different websites without problems.
The max expiration time is one year (= 'Never expire'), so that message seems OK to me.
Maybe it's having trouble with 'forever' and 'null' though. I don't know. What you could do is change it to 'custom' and '525600' (365 * 24 * 60).
Other than that I would know to be honest...
The max expiration time is one year (= 'Never expire'), so that message seems OK to me.
Maybe it's having trouble with 'forever' and 'null' though. I don't know. What you could do is change it to 'custom' and '525600' (365 * 24 * 60).
Other than that I would know to be honest...
So... "never expire" really isn't "never expire"? Perhaps those words should be changed to "max age of one year" or some such... As is, it's quite confusing.
So on my little test, where I overrode the cache settings on a specific page: the global setting is "never expire" and the local setting is "60 minutes". The local page cache currently says it is cached and will expire at 9:10am ET. It is now 10:54am ET. It didn't expire when it was supposed to... *sigh*
Edit:
Well wait. I just pulled the page from a separate browser, after clearing that browser's local cache. The page cache did refresh on the server. What this tells me is that when the page's cache is expired, it doesn't actually tell you that, and the page isn't actually removed from the cache until the next time it is requested.
I really am starting to think that the issue is not that the cache mechanism isn't working but rather that the messages presented to the user are unclear, confusing, or outright incorrect.
So on my little test, where I overrode the cache settings on a specific page: the global setting is "never expire" and the local setting is "60 minutes". The local page cache currently says it is cached and will expire at 9:10am ET. It is now 10:54am ET. It didn't expire when it was supposed to... *sigh*
Edit:
Well wait. I just pulled the page from a separate browser, after clearing that browser's local cache. The page cache did refresh on the server. What this tells me is that when the page's cache is expired, it doesn't actually tell you that, and the page isn't actually removed from the cache until the next time it is requested.
I really am starting to think that the issue is not that the cache mechanism isn't working but rather that the messages presented to the user are unclear, confusing, or outright incorrect.
Also, which C5-version are you running?
Do you have overrides?