In cache-aside, your application checks the cache first. On a miss, it fetches from the database and populates the cache.
Read path:
Check cache for key
If miss, query database
Store result in cache with TTL
Return data
You control exactly what gets cached. The cache only contains data that has been requested. This pattern handles cache failures gracefully since your app can always fall back to the database.