Title: Fallback cache functionality
Last modified: August 11, 2022

---

# Fallback cache functionality

 *  Resolved [egravity](https://wordpress.org/support/users/egravity/)
 * (@egravity)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/fallback-cache-functionality/)
 * Hi,
 * Thanks for your amazing plugin. I just have a technical question about when Fallback
   Cache is supposed to generate a html document in the fallback_cache folder.
 * I am monitoring a couple of sites with this feature enabled, but can’t seem to
   figure out what triggers fallback_cache to generate. The .tmp key files in cached_html_pages
   are generated as I would expect on a successful GET request when there is no 
   Cloudflare cache present. But the HTML files in fallback_cache appear to show
   up at random, sometimes several hours apart and long after they appeared in cached_html_pages.
 * Is this intended functionality? Do they only generate when Cloudflare cache expires
   or is invalidated? Or could there be a different technical issue with my installations?
 * Thanks in advance.

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/fallback-cache-functionality/#post-15910267)
 * Hi,
    `cached_html_pages` and `fallback_cache` are two different functions. So,
   the `cached_html_pages` kicks in when you have enabled the option of Purging 
   only HTML pages: [https://i.imgur.com/evz08nZ.jpeg](https://i.imgur.com/evz08nZ.jpeg)
 * In this case when you purge cache for a page or when you update a content and
   the plugin starts purging cache for that page and related pages, instead of purging
   everything, i.e. the main HTML page requests + the static files of the page, 
   instead it only purging the main URL that is HTML page. E.g. `https://example.
   com/something-foo/`.
 * So, to facilitate that feature, the system needs to know all the page URLs that
   are cached in Cloudflare. So, the way it does is, when someone access a page 
   for the first time and it is not yet cached in CF CDN, the plugin takes that 
   URL of the request and put it in the `cached_html_pages` folder with a `.tmp`
   file.
 * Also at this time, if you have fallback cache enabled, the plugin will also generate
   a disk level cache of the HTML page in the fallback cache folder. So, that in
   future if the cache expires and the request comes to the origin server, then 
   instead of executing PHP the fallback cache and send the disk cached HTML.
 * But if you have prefetch on hover or prefetch on viewport option enabled in the
   others tab of the plugin settings, at that time the prefetch request invoke Cloudflare
   to cache that page but fallback cache is not yet generated. So, when that cache
   expires and request comes to the origin server again – at that time the fallback
   cache is generated.
 * I hope this clarifies your doubt and question.
 * Also note that if you have a moderate traffic website with Cloudflare Smart Tiered
   Cache enabled in Cloudflare dashboard, you might not need the fallback cache 
   and Cloudflare will keep the content cached for much longer time.
 * To learn more about how Cloudflare cache works, check out: [https://acnam.com/untold-truths-of-cloudflare-cdn/#cloudflare-cache-creation-replication-storage](https://acnam.com/untold-truths-of-cloudflare-cdn/#cloudflare-cache-creation-replication-storage)

Viewing 1 replies (of 1 total)

The topic ‘Fallback cache functionality’ is closed to new replies.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [iSaumya](https://wordpress.org/support/users/isaumya/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/fallback-cache-functionality/#post-15910267)
 * Status: resolved