Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.58k stars 799 forks source link

Cache either invalidating or flushing too soon? #25518

Open pdcable opened 6 years ago

pdcable commented 6 years ago

I am using your plugin on the site https://www.sunnylandfarms.com. Version 1.5.8

I have the cache timeout set to 9600 seconds and garbage collection at 3200 seconds. I am using the However, after just 5 or 10 minutes, the cache will seem to invalidate. I'll go from 1 second page loads up to 8 second page loads, then once loaded, it's back to normal 1s load times. Walk away for 5 minutes, try to hit the page again, and back to the 8 second load time.

I think this is not normal behavior. If I could just solve this one problem, the plugin will work perfectly for me. Is there any way I can figure out what is happening and try to resolve it?

pdcable commented 6 years ago

This may be a moot issue. I had just upgraded from 1.4.9 to 1.5.8, and it may have resolved the issue. I'll update the ticket tomorrow with a firm yes or no. Thanks!

pdcable commented 6 years ago

No, it's definitely still doing it. Right now each page should be cached for a total of 2.66 hours. Literally within a few minutes it will force a full page reload. The browser itself is caching images, and I can see via inspector that most of the content is being loaded from memory and disk cache. It's just the initial page request that is taking over 8 seconds. However, a subsequent request to that same page within a few minutes takes less than 1 second. This has to be server side. I am assuming the cache is invalidating. How can I make it honor the timeout set in the configuration?

pdcable commented 6 years ago

Issue seems to be happening when this rename happens. The cache file was already there, but definitely created less than 2.6 hours ago. However, it renames the file and creates a new one. Can you tell me what is causing this?

13:57:40 7044 /product/extra-fancy-raw-pecans-tin/ Output buffer callback 13:57:40 7044 /product/extra-fancy-raw-pecans-tin/ wp_cache_get_cookies_values: cached: 72e9c2f242a532b8af60313f6b7930c9 13:57:40 7044 /product/extra-fancy-raw-pecans-tin/ Writing non-gzipped buffer to wp-cache cache file. 13:57:40 7044 /product/extra-fancy-raw-pecans-tin/ Renamed temp wp-cache file to F:\inetpub\wwwroot\PHP_Sites\sunnyland-farms\wp-content\cache\supercache\www.sunnylandfarms.com\product\extra-fancy-raw-pecans-tin//wp-cache-2d5b8c8f11246da6821d703dca692b3e.php 13:57:40 7044 /product/extra-fancy-raw-pecans-tin/ Sending buffer to browser 13:57:40 7044 /product/extra-fancy-raw-pecans-tin/ wp_cache_shutdown_callback: collecting meta data. 13:57:40 7044 /product/extra-fancy-raw-pecans-tin/ Sending 'Content-Type: text/html; charset="UTF-8"' header. 13:57:40 7044 /product/extra-fancy-raw-pecans-tin/ Writing meta file: F:\inetpub\wwwroot\PHP_Sites\sunnyland-farms\wp-content/cache/supercache/www.sunnylandfarms.com/product/extra-fancy-raw-pecans-tin/meta-wp-cache-2d5b8c8f11246da6821d703dca692b3e.php