0
0
HLDsystem_design~10 mins

Cache invalidation strategies in HLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to name the cache invalidation strategy that removes data after a fixed time.

HLD
The cache invalidation strategy that removes data after a fixed time is called [1].
Drag options to blanks, or click blank then click option'
AWrite-through
BManual
CTime-to-Live
DWrite-back
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing TTL with manual invalidation.
2fill in blank
medium

Complete the code to name the strategy where cache is updated immediately when the database changes.

HLD
The cache invalidation strategy that updates cache immediately on database write is called [1].
Drag options to blanks, or click blank then click option'
AWrite-through
BWrite-back
CLazy loading
DCache-aside
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up with write-back or cache-aside strategies.
3fill in blank
hard

Fix the error in naming the cache invalidation strategy where cache is updated only on read miss.

HLD
The cache invalidation strategy where cache is updated only on read miss is called [1].
Drag options to blanks, or click blank then click option'
ACache-aside
BWrite-back
CWrite-through
DTime-to-Live
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing with write-through or TTL strategies.
4fill in blank
hard

Fill both blanks to complete the cache invalidation description: "In {{BLANK_1}} strategy, database is updated {{BLANK_2}} after cache write."

HLD
In [1] strategy, database is updated [2] after cache write.
Drag options to blanks, or click blank then click option'
AWrite-back
BWrite-through
CAsynchronously
DSynchronously
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing synchronous and asynchronous updates.
5fill in blank
hard

Fill all three blanks to complete the cache invalidation rule: "If data is {{BLANK_1}}, cache must be {{BLANK_2}} or {{BLANK_3}}."

HLD
If data is [1], cache must be [2] or [3].
Drag options to blanks, or click blank then click option'
Astale
Binvalidated
Crefreshed
Dcached
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'cached' instead of 'invalidated' or 'refreshed'.