11ty/eleventy-fetch

Reusing build time cache with serverless

ryangittings opened this issue · 5 comments

I’m following the docs here:

https://www.11ty.dev/docs/plugins/serverless/#re-use-build-time-cache-from-the-fetch-plugin

So, here's a test case to describe my issue. Here are two URLs:

/build/
/serverless/

Hit the serverless endpoint, and with every hit you'll see the log that it's fetching:

[11ty/eleventy-fetch] Fetching: https://dummyjson.com/products/1

https://github.com/ryangittings/11ty-serverless-fetch-issue

I’d expect the build cache to be reused and the URL not to be hit.

Huh. Well, this is definitely a bug!

Using dryRun actually prevented both file reads and writes, when clearly we want to allow reads.

This will ship with Eleventy Fetch 4.0.0

Awesomesauce! Can I use a patch or a specific branch in npm in the meantime?

This will ship in the next hour or two just going through the rest of the backlog on this repo first

(it’s on github now)

4.0 has shipped!