mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Upgrade chi to v5 (#17298)
This commit is contained in:
7
vendor/gitea.com/go-chi/cache/file.go
generated
vendored
7
vendor/gitea.com/go-chi/cache/file.go
generated
vendored
@@ -25,8 +25,6 @@ import (
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/unknwon/com"
|
||||
)
|
||||
|
||||
// Item represents a cache item.
|
||||
@@ -136,7 +134,10 @@ func (c *FileCacher) Decr(key string) error {
|
||||
|
||||
// IsExist returns true if cached value exists.
|
||||
func (c *FileCacher) IsExist(key string) bool {
|
||||
return com.IsExist(c.filepath(key))
|
||||
if item, err := c.read(key); err == nil {
|
||||
return !item.hasExpired()
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Flush deletes all cached data.
|
||||
|
Reference in New Issue
Block a user