Which caching strategy will meet these requirements?
A read-through cache
A write-behind cache
A lazy-loading cache
A write-through cache
Explanations:
A read-through cache loads data into the cache when it is requested but does not ensure real-time updates for dashboards as the data is loaded on demand.
A write-behind cache writes changes to the database asynchronously after they are cached. This strategy is not optimal for real-time updates to dashboards.
A lazy-loading cache only loads data into the cache when it is accessed, which could lead to stale data for real-time dashboards if updates are not frequent.
A write-through cache writes data to both the cache and the database simultaneously. This ensures that the cached data is always up-to-date, making it ideal for real-time dashboards.