RSS: fetch_feed caching with different caching delay per feed?

You can use the second parameter passed to the wp_feed_cache_transient_lifetime filter which, in the context of fetch_feed(), is the URL of the feed: add_filter( ‘wp_feed_cache_transient_lifetime’, function ( $time, $url ) { if ( $url === ‘https://example.com/rss’ ) { $time = MONTH_IN_SECONDS; } return $time; }, 10, 2 );

Any idea why Google not caching my site? [closed]

I looked at the source code of the site and found this: <meta name=”robots” content=”noodp,noydir,noarchive,nosnippet”/> Apparently noarchive tells Google to not cache the page. Check out Google Webmaster Tools documentation/guidelines for “Meta tags” for more info on what each value does. PS: If you are unaware, nosnippet should also be removed as it “prevents a … Read more

How to clear user’s browser cache after publishing a new post?

There are kind of two levels to browsing caching: Browser is provided with explicit information when page expires via response headers or 304 Not Modified response. Browser kind of assumes that page was loaded very recently and is still good for a while. Respectively there are two possible things going wrong: Your server is replying … Read more

How does WP’s cache maintain persistence through page reloads?

The short answer is: it doesn’t That doesn’t mean it can’t be made persistent, and it doesn’t mean it doesn’t improve performance. Performance Gains Despite No Persistence Lets say we fetch 5 posts, and on each post we retrieve various post meta. You might think that each call to get_post_meta results in an additional DB … Read more