Core concepts
Caching
1 min read
Lunadeck caches build dependencies between runs to significantly reduce build times after the first build.
What gets cached
| Layer | Cache Key | Typical Size |
|---|---|---|
node_modules | Lockfile hash (package-lock.json, yarn.lock, etc.) | 200-500 MB |
| Gradle dependencies | build.gradle + Gradle wrapper version | 300-800 MB |
| Android SDK components | SDK version + build tools version | 500 MB - 1 GB |
| Web build cache | Framework-specific (e.g., .next/cache) | 50-200 MB |
Cache invalidation
Caches are automatically invalidated when:
- The lockfile changes (dependencies updated)
- The framework version changes
- You manually clear the cache from the dashboard
- The cache is older than 30 days
Cache hits
A full cache hit can reduce build times by 60-80%. The first build typically takes 5-8 minutes, while cached builds complete in 1-3 minutes.
Disabling cache
To force a clean build without cache, toggle Clean Build in the build dialog or add "cache": false to your lunadeck.config.json.