X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=cache.go;h=bdbe6f8973596bf6a970b35cb8930fd5c848d6d2;hb=cecf0a395b431927ca917ffe2b3dddd953a5b6ad;hp=0679a7d14efafc3d0ee270a75685290fc08d331a;hpb=a6d698d50430a58b8b46597d37d9742c3e0515df;p=go-anidb.git diff --git a/cache.go b/cache.go index 0679a7d..bdbe6f8 100644 --- a/cache.go +++ b/cache.go @@ -7,7 +7,6 @@ import ( "errors" "fmt" "io" - "log" "os" "path" "reflect" @@ -16,8 +15,6 @@ import ( "time" ) -var _ log.Logger - type Cacheable interface { // Updates the last modified time Touch() @@ -142,9 +139,6 @@ func (c *cacheDir) DeleteAll(keys ...cacheKey) (err error) { } func (c *cacheDir) Get(v Cacheable, keys ...cacheKey) (err error) { - defer func() { - log.Println("Got entry", keys, "(error", err, ")") - }() val := reflect.ValueOf(v) if k := val.Kind(); k == reflect.Ptr || k == reflect.Interface { @@ -213,9 +207,6 @@ func (c *cacheDir) Set(v Cacheable, keys ...cacheKey) (n int64, err error) { return // no point in saving nil } } - defer func() { - log.Println("Set entry", keys, "(error", err, ")") - }() // First we encode to memory -- we don't want to create/truncate a file and put bad data in it. buf := bytes.Buffer{}