mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
add expiry/size to otp
This commit is contained in:
2
pkg/cache/cache.go
vendored
2
pkg/cache/cache.go
vendored
@@ -103,6 +103,7 @@ func (c *cache) Get(key string, val interface{}) error {
|
||||
if err != nil && err == store.ErrNotFound {
|
||||
return ErrNotFound
|
||||
} else if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(recs) == 0 {
|
||||
return ErrNotFound
|
||||
@@ -111,6 +112,7 @@ func (c *cache) Get(key string, val interface{}) error {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
// put it in the cache for future use
|
||||
// set in the lru
|
||||
rec := recs[0]
|
||||
|
||||
Reference in New Issue
Block a user