Interview Prep/Jenkins/Shared libraries

How does library caching work and why might it matter?

AdvancedConceptShared libraries
Answer

By default Jenkins fetches the library from SCM on every build. Large orgs with hundreds of builds per hour can hammer Git and slow build start. The global library configuration offers Cache fetched versions on controller for quick retrieval with a refresh time in minutes and an exclusion list (exclude moving branches like main). Cache tags, not branches, or you will run stale code.

All Jenkins questions Roadmap: Jenkins

More on Shared libraries