Flashcardsfor IT Certifications

D1: Caching & Artifacts

GH-200 GitHub Actions exam practice questions · 11 flashcards

Question
actions/cache?
1 / 11

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 11 Caching & Artifacts practice questions and answers
  1. actions/cache?
    Caches dependencies between runs using key and restore-keys.
  2. Cache key best practice?
    Include OS and hashFiles of lockfile, e.g. ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}.
  3. restore-keys?
    Fallback prefixes for partial cache hits.
  4. Cache limits?
    Default 10 GB per repo; least recently used eviction; caches unused for 7 days evicted.
  5. setup-* built-in caching?
    actions/setup-node etc. support cache: npm/pip/maven.
  6. Artifacts?
    Files produced by jobs uploaded with actions/upload-artifact and downloaded with download-artifact.
  7. Artifact retention?
    Default 90 days (configurable 1–90 public, up to 400 private/enterprise) via retention-days or settings.
  8. Cache vs artifact?
    Cache: speed up reuse of dependencies. Artifact: persist/share job outputs and results.
  9. Retention policies via REST API?
    Set org/repo artifact and log retention (actions permissions API); delete artifacts/runs programmatically.
  10. Artifact immutability (v4)?
    Artifacts are immutable; unique names per job required.
  11. Cache scope across branches?
    Caches from default branch are accessible to other branches; branch caches isolated.