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.
More on Shared libraries
What is the directory structure of a shared library?BeginnerHow does a `vars/` global step work?BeginnerWhat goes in `src/` and how is it used?IntermediateHow do classes in `src/` call pipeline steps?IntermediateWhat is `libraryResource` used for?IntermediateWhat are the ways to load a library in a Jenkinsfile?Intermediate