Skip to content

Commit

Permalink
[-] updated the ascii diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
bnkamalesh committed Oct 4, 2024
1 parent 4a6d291 commit f3b62e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A debounced update is initiated when a key is fetched within its threshold windo
```
|_____________________ _____threshold____ ________|
0min 9mins 10mins
set key here fetch key key expires
add key here get key key expires
```

Consider a cache expiry of 10 minutes, and a threshold window of 1 minute. In the timeline above, we set the cache at `0min`, and `10mins` is when the cache is set to expire. If you try to **Get** a key between `9mins` & `10mins`, then it is within the _threshold_ window. At this point, it would initiate a cache update preemptively, assuming this key would be accessed again. Thereby maintaining the freshness of the data in the cache.
Expand Down

0 comments on commit f3b62e1

Please sign in to comment.