From 9242ee35fedc5ad7315b0883578848f324b58f89 Mon Sep 17 00:00:00 2001 From: rjbasitali Date: Tue, 5 Apr 2022 04:11:54 +0500 Subject: [PATCH] cache eviction using sweeper --- cache.go | 1 + errors.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cache.go b/cache.go index 97f31c2..d0bd9d3 100644 --- a/cache.go +++ b/cache.go @@ -4,4 +4,5 @@ type Cache interface { Get(key string) (interface{}, error) Set(key string, data interface{}) error Remove(key string) error + Flush() } diff --git a/errors.go b/errors.go index c29bb5e..5845949 100644 --- a/errors.go +++ b/errors.go @@ -3,5 +3,5 @@ package gocache import "errors" var ( - ErrKeyNotFound = errors.New("Key not found") + ErrKeyNotFound = errors.New("key not found") )