eko / gocache

☔️ A complete Go cache library that brings you multiple ways of managing your caches
https://vincent.composieux.fr/article/i-wrote-gocache-a-complete-and-extensible-go-cache-library/
MIT License
2.42k stars 192 forks source link

FreecacheStore does not implement FreecacheClientInterface #202

Closed BaptisteLemarcis closed 1 year ago

BaptisteLemarcis commented 1 year ago

Hello, While trying to implement freecache store I noticed a blocking issue for me :

"github.com/eko/gocache/store/freecache/v4".FreecacheStore does not implement "github.com/eko/gocache/store/freecache/v4".FreecacheClientInterface (wrong type for method Clear)

With the function Clear(ctx context.Context) error we are also compliant to store.StoreInterface, so I think the only issue is in the FreecacheClientInterface Clear method.

Steps for Reproduction Simply try to pass a freecache.FreecacheStore to freecache.NewFreecache

Expected behavior: That freecache.FreecacheStore implements fully freecache.NewFreecache so that method Clear from interface require a Context or not

Actual behavior: freecache.FreecacheClientInterface Clear() method does not require any argument and no return freecache.FreecacheStore Clear(_ context.Context) error require context.Context but discard it

Versions:

github.com/eko/gocache/lib/v4 v4.1.3 github.com/eko/gocache/store/freecache/v4 v4.1.2

Thanks

BaptisteLemarcis commented 1 year ago

New to go, not an issue sorry