Andy Fusniak
Andy Fusniak

Reputation: 1638

What exactly is the Node.js module dependency cache in the context of Firebase Cloud Functions?

I watched an interesting video titled "Cloud Functions Cold Boot Time" (https://youtu.be/IOXrwFqR6kY) in which the presenter says

" ... more popular versions of a package are most likely already stored in GCF's dependency cache, meaning importing and resolving can be done much quicker."

Is there a way to see what's in the cache, so that we can optimise based around the available modules?

How much quicker is it to load from the cache? Is it in memory, or on disk?

Upvotes: 1

Views: 589

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317487

You have no visibility or control over any caching that may (or may not) occur with npm dependencies used with Cloud Functions, other that what you observe through experimentation (as the presenter suggests).

Upvotes: 1

Related Questions