Rename lib_store and redis_store imports. Cache get remove redundant nil check.

This commit is contained in:
Stefan Aurori 2024-03-14 20:43:27 -04:00
parent e8952e964c
commit 15739cc82e
3 changed files with 11 additions and 12 deletions

View file

@ -9,9 +9,8 @@ import (
"github.com/mikestefanello/pagoda/pkg/context"
"github.com/mikestefanello/pagoda/pkg/services"
lib_store "github.com/eko/gocache/lib/v4/store"
libstore "github.com/eko/gocache/lib/v4/store"
"github.com/labstack/echo/v4"
"github.com/redis/go-redis/v9"
)
// CachedPageGroup stores the cache group for cached pages
@ -58,7 +57,7 @@ func ServeCachedPage(ch *services.CacheClient) echo.MiddlewareFunc {
if err != nil {
switch {
case errors.Is(err, &lib_store.NotFound{}) || err == redis.Nil:
case errors.Is(err, &libstore.NotFound{}):
c.Logger().Info("no cached page found")
case context.IsCanceledError(err):
return nil