login record CRD (#2565)
* Signed-off-by: hongming <talonwan@yunify.com> support ldap identity provider Signed-off-by: hongming <talonwan@yunify.com> * add login record Signed-off-by: Jeff <zw0948@gmail.com> Co-authored-by: hongming <talonwan@yunify.com>
This commit is contained in:
9
pkg/simple/client/cache/simple_cache.go
vendored
9
pkg/simple/client/cache/simple_cache.go
vendored
@@ -76,13 +76,8 @@ func (s *simpleCache) Set(key string, value string, duration time.Duration) erro
|
||||
|
||||
func (s *simpleCache) Del(keys ...string) error {
|
||||
for _, key := range keys {
|
||||
if _, ok := s.store[key]; ok {
|
||||
delete(s.store, key)
|
||||
} else {
|
||||
return ErrNoSuchKey
|
||||
}
|
||||
delete(s.store, key)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -99,7 +94,7 @@ func (s *simpleCache) Get(key string) (string, error) {
|
||||
func (s *simpleCache) Exists(keys ...string) (bool, error) {
|
||||
for _, key := range keys {
|
||||
if _, ok := s.store[key]; !ok {
|
||||
return false, ErrNoSuchKey
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user