• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Startup Hero

The Official Blog Of Name Hero

Learn To Fly Above The Competition Get Started
  • HomeWelcome
  • CoursesVideo Training Center
  • About UsWhat is StartupHero?
  • BlogGet the latest
  • Start HereStartup 101
  • SpeakingPodcast & Media
  • ResourcesTools to help You
    • Reselling WordPress Hosting
    • Resell Hero
    • How To Start A Blog
  • NameHeroCloud Web Hosting

Two Layers of Caching is Optimal – No More No Less

By Bhagwad Park on October 2, 2020 0

Two Layers of Caching is Optimal – No More No Less

I’ve tried a lot of different caching configurations on my site over the years. 3rd party plugins, server-based caching, Cloudflare caching – and I soon hope to try LiteSpeed’s new QUIC.cloud. I’ve experimented with different configurations, combining multiple techniques, and I’ve finally settled on my preferred setup – two layers of caching. One at the local server, and one somewhere on the cloud. I believe it provides the best mix of performance and flexibility for an average WordPress site.

Let me explain the two layers that I use, and why I believe my set up is the best.

1. Caching at the Origin – Either 3rd Party Plugins or Server-Based

The first layer of caching that I recommend, is at your origin server. If you’re using WordPress, this can take the form of 3rd party plugins like W3 Total Cache or WP Rocket. Or if you’re lucky enough to host with a provider like NameHero, you can use the built-in server caching of LiteSpeed. As explained in the linked article, the latter if faster than the former because it doesn’t use up server resources allocated to your website, unlike other PHP based plugins on WordPress. So you don’t suffer any performance penalty for using it.

Caching at the origin means that every page is generated exactly once.

2. Caching on the EDGE

I’ve hovered back and forth between the usefulness of caching content on the EDGE. On the one hand, it seems to run into problems with EDGE CDN providers like Cloudflare discarding your cached content if its not accessed for a couple of days. And on websites with hundreds of URLs, this means that a large chunk of your content will always remain uncached. Plus, if you make a change on your site, the entire cache needs to be purged again. Hence, I was against it.

But then I started to use it differently with only caching for a few top performing pages. The free Cloudflare plan allows you only 3 rules, so it can get rather sticky if you want to cache specific pages, but if you pull the lever for the Pro plan, you get a whopping 20 page rules to play around with. This can dramatically speed up the most important parts of your site.

Lately, I’ve started using the WP Cloudflare Super Page cache to reduce my global TTFB to less than 0.5 seconds. The plugin takes a lot of the headache out of EDGE caching, with automatic page-specific content purging, allowing us to access the admin area without breaking the page cache, or accidentally serving logged in content to anonymous users. It works great! I suggest you check it out.

Why the 2-Tiered Structure Works

The 2-tiered structure works for two different types of content. Frequently used content gets served via the high-speed page cache. Relatively little used content gets sent to the origin server, where it is served using the generated cache. The advantage of the latter is that it has no expiry date. I suppose there is a slight delay when the cached content is not found at the EDGE, and has to go to the origin, but compared to the benefits, I believe the trade-off is more than worth it.

Bottom Line

So two caching tiers appear to be the optimal choice. Using this, I’ve managed to greenlight all my Core Web Vitals metrics in the Google Search Console. And with a little bit of experimentation, you can do the same. Stay tuned for more updates on this, as NameHero continues to push the boundaries of what’s “standard” in web hosting!

Bhagwad Park Profile Picture
Bhagwad Park

I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Connect With Us!

Superhero Resources

Fix Common Issues

  • How To Setup Free And Automatic SSL Certificates
  • How To Setup Cloudflare With Railgun
  • How To Fix Memory Exhausted Errors In WordPress
  • How To Edit PHP Version/Upload Limit/Add Extensions
  • How To Move/Migrate Your Business To Name Hero

Free Guides

  • How To Setup NameHero Hosting
  • How To Create A Web Hosting Business With WordPress
  • How To Start A WordPress Blog
  • How To Migrate WordPress To A VPS
  • How To Speed Test And Optimize Your WordPress Website
  • Magento 2.X Installation Guide
  • How To Clean Up A WordPress Hack

Training

Recent Posts

  • The Best WordPress Plugin To Combat Plagiarism
  • Is It Time to Bring Back Blog Comments?
  • Two Filters That No Longer Work In Gutenberg (And Workarounds)
  • Migrating To The New Cloudflare Managed Rules Interface
  • How To Sort Posts By The “Last Modified” Date
  • How To Make WordPress Send E-mail From Another Address
Subscribe in a reader
  • Web Hosting
  • WordPress Hosting
  • Reseller Hosting
  • VPS Hosting
  • Twitter
  • Facebook
  • LinkedIn
  • YouTube
  • FTC Disclosure
  • Earnings Disclosure
  • Privacy Policy

Copyright © 2023 · Smart Passive Income Pro on Genesis Framework · WordPress · Log in