How to force W3TC Page Cache using Disk Enhanced to cache latest posts/custom rules [closed]

Question

Have been using W3TC since 6 years now on my WordPress blog. Never faced an issue apart from this one below:

I had set Page Cache to Disk Enhanced and it was working great until one day my website refused to open. Upon inspection, I realized that the cache folder /var/www/domain.com/htdocs/wp-content/cache was ~950GB and my server disk space was 950GB. So it had basically eaten up all disk space, not allowing other services to run properly.

A bit of context: My site is 6 years old. Have 24,000 posts and 100GB of wp-upload folder.
Server specs:

48GB RAM
960GB SSD drive
12 core processor
LEMP stack

So W3TC was caching all my articles (even from 2014, 2015 etc) as per my sitemap. Upon more inspection, I realized that it takes sitemap priority to build the cache over time. But in my case it made little sense as my website is a news site. And news from last year or last month is already stale and I don’t get a lot of visits on those.

So is there a way, we can add rules to nginx so that disk enhanced caches most recent articles (say latest till last 2 weeks) and maybe if someone accesses an old post (say from last year) the page is cached.

I have full access to my server, can make nginx entries. Since I didn’t know what rules to enter, I switched from disk enhanced to Memcache for Page Caching (size 4GB), but it’s very slow compared to Disk Enhanced. It was the best.

Can someone please guide me.

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/how-to-force-w3tc-page-cache-using-disk-enhanced-to-cache-latest-posts-custom-rules-closed/">

How to force W3TC Page Cache using Disk Enhanced to cache latest posts/custom rules [closed]</a>
0
, , , , LittleLebowski 4 weeks 0 Answers 25 views 0

Leave an answer