Core concepts

Caching

1 min read

Lunadeck caches build dependencies between runs to significantly reduce build times after the first build.

What gets cached

LayerCache KeyTypical Size
node_modulesLockfile hash (package-lock.json, yarn.lock, etc.)200-500 MB
Gradle dependenciesbuild.gradle + Gradle wrapper version300-800 MB
Android SDK componentsSDK version + build tools version500 MB - 1 GB
Web build cacheFramework-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.