From 2ff889bcaef56feb1e3625cd08307b0cf4fc829a Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Thu, 23 Jan 2020 10:04:47 +0800 Subject: [PATCH] document Clear --- readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.md b/readme.md index 04029b0..5a06925 100644 --- a/readme.md +++ b/readme.md @@ -91,6 +91,9 @@ item, err := cache.Fetch("user:4", time.Minute * 10, func() (interface{}, error) cache.Delete("user:4") ``` +### Clear +`Clear` clears the cache. This method is **not** thread safe. It is meant to be used from tests. + ### Extend The life of an item can be changed via the `Extend` method. This will change the expiry of the item by the specified duration relative to the current time.