# Cloudflare Pages build caching

**URL:** <https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995>\
**Category:** Meta\
**Created:** [May 23, 2024, 8:35pm UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995 "2024-05-23T20:35:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmcltr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tmcltr/32/1170_2.png) [@tmcltr](https://discourse.gohugo.io/u/tmcltr)\
**Post date:** [May 23, 2024, 8:35pm UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/1 "2024-05-23T20:35:54Z")

</div>

A Cloudflare engineer ([dario-piotrowicz (Dario Piotrowicz) · GitHub](https://github.com/dario-piotrowicz)) is interested in working on adding persistent build caching for Hugo projects deployed on Cloudflare Pages. This is something they [already offer](https://developers.cloudflare.com/pages/configuration/build-caching/#frameworks) for some frameworks, but not yet Hugo.

On the Cloudflare Discord, he asked to connect with a Hugo maintainer to make sure he gets things right.

Are there any Hugo maintainers who might be interested/available to help with this?

Apologies if this is not the right venue for a request like this. I considered opening an issue on Github, but this seemed more appropriate.

[Here’s a link to the thread on Discord.](https://discord.com/channels/595317990191398933/1243286495016779828/1243288606651711538)

And I’m attaching a screenshot too just in case that link doesn’t work:

 ![CleanShot 2024-05-23 at 13.34.18@2x](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/1/e/1e3167c3bf53045325988ce505908ca49567620b.png)

---

<div class="post-metadata">

**Author:** ![Arif](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arif/32/20931_2.png) [@Arif](https://discourse.gohugo.io/u/Arif)\
**Post date:** [May 24, 2024, 5:20am UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/2 "2024-05-24T05:20:41Z")

</div>

> [@tmcltr](#):
>
> Are there any Hugo maintainers who might be interested/available to help with this?

The only Hugo maintainer is @bep (with support from @jmooring _etal_.)

---

<div class="post-metadata">

**Author:** ![tmcltr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tmcltr/32/1170_2.png) [@tmcltr](https://discourse.gohugo.io/u/tmcltr)\
**Post date:** [May 25, 2024, 1:08am UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/3 "2024-05-25T01:08:34Z")

</div>

Well if @bep or @jmooring are willing to be available to answer any questions from Dario, my Cloudflare Pages deployment times will be improved by an order of magnitude. 😂

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 25, 2024, 11:32am UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/5 "2024-05-25T11:32:56Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/5/9/5962bb39a3883c4cc424571d449be6554fb91b78.png)

[link to conversation](https://discord.com/channels/595317990191398933/1243286495016779828/1243886665588539443)

---

<div class="post-metadata">

**Author:** ![tmcltr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tmcltr/32/1170_2.png) [@tmcltr](https://discourse.gohugo.io/u/tmcltr)\
**Post date:** [May 25, 2024, 4:55pm UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/6 "2024-05-25T16:55:02Z")

</div>

Thank you for your help, @jmooring !!

---

<div class="post-metadata">

**Author:** ![jobe](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jobe/32/18282_2.png) [@jobe](https://discourse.gohugo.io/u/jobe)\
**Post date:** [March 31, 2025, 8:29am UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/7 "2025-03-31T08:29:54Z")

</div>

I’ve asked again. While Dario from CF is quick to respond, unfortunately there’s still no progress, and it doesn’t sound like there will be.

> **[Discord - Group Chat That’s All Fun & Games](https://discord.com/channels/595317990191398933/1277899008441974804)**
>
> Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.

 ![Screenshot 2025-03-31 at 10.24.46](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/e/8/e8957644269fdd0bf2df89e0e22c86bc94ea040c.jpeg)

---

<div class="post-metadata">

**Author:** ![alcarazr](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/alcarazr/32/11576_2.png) [@alcarazr](https://discourse.gohugo.io/u/alcarazr)\
**Post date:** [March 31, 2025, 6:58pm UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/8 "2025-03-31T18:58:23Z")

</div>

[My GH workflow](https://github.com/rodrigoalcarazdelaosa/fisiquimicamente/blob/853cd7d0e18f2d1462fd4ee98cbb92462acec16d/.github/workflows/publish-CFP.yml#L60) includes a Cache Action that caches the _resources_ folder, allowing for quick builds (not as fast as locally, but good enough).

---

<div class="post-metadata">

**Author:** ![jobe](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jobe/32/18282_2.png) [@jobe](https://discourse.gohugo.io/u/jobe)\
**Post date:** [April 1, 2025, 6:20am UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/9 "2025-04-01T06:20:17Z")

</div>

Hi @alcarazr , that’s smart. Thanks for pointing me in that direction! I’ll try that

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [May 26, 2026, 9:24pm UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/10 "2026-05-26T21:24:06Z")

</div>

A little late to the game here, but I did some investigation, and I could make it work with a terrible hack making my project “look like a Eleventy project”:

- [Try to set cache dir · bep/hdrsdr.com@fcb889e · GitHub](https://github.com/bep/hdrsdr.com/commit/fcb889e510879fc3612a97d78701f8a644fb20fe)

With the above, the build time for this gallery site went down from 15s to 100ms.

But what a grimy hack, but it at least shows that it should not be too hard for Cloudflare to make this happen also in custom builds.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [May 28, 2026, 7:37am UTC](https://discourse.gohugo.io/t/cloudflare-pages-build-caching/49995/11 "2026-05-28T07:37:42Z")

</div>

This is supposed to be fixed by [[Pages] Add Hugo to build caching frameworks by ericclemmons · Pull Request #29687 · cloudflare/cloudflare-docs · GitHub](https://github.com/cloudflare/cloudflare-docs/pull/29687)

I don’t think it’s live yet (I tested).
