DevOps / Scripts
yaml
Intermediate
GitLab CI Cache Strategy
Cache node_modules and pip packages per branch in GitLab CI to cut build times.
yaml
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
- .venv/
policy: pull-push
install:
script:
- npm ci
- python -m venv .venv && .venv/bin/pip install -r requirements.txt
Prerequisites
- GitLab CI
Pro Tips
- → Use policy: pull for jobs that don't install new packages.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- yaml
- Level
- Intermediate
- Read time
- 3 min
- Published
- Sep 2026
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
Postgres S3 Backup
Dump a Postgres database, gzip it, push to S3 with AES256 encryption.
bash
·
Intermediate
Disk Usage Alert
Send an alert when any mounted filesystem exceeds a usage threshold.
bash
·
Beginner
Docker Image Cleanup Script
Remove dangling images, stopped containers and unused volumes in one pass.
bash
·
Intermediate