Key-based caching in Rails uses cache keys that include the model id and a timestamp to automatically invalidate caches when the model is updated. Cache keys can also include template digests, which change when the template code changes to bust caches on code deploys. The "Russian doll" caching strategy busts caches for a model when related models like reviews are updated. Declaring template dependencies can help Rails determine when to bust caches based on changes to templates or other files.