Skip to content

Commit

Permalink
doc: rely on cache.Wait() instead of time.Sleep() (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
CamiloGarciaLaRotta authored Jun 13, 2021
1 parent 1ff978f commit 01b9f37
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 @@ -72,7 +72,7 @@ func main() {
cache.Set("key", "value", 1)

// wait for value to pass through buffers
time.Sleep(10 * time.Millisecond)
cache.Wait()

value, found := cache.Get("key")
if !found {
Expand Down

0 comments on commit 01b9f37

Please sign in to comment.