Skip to content

Commit

Permalink
fix(os/gcache): #3935
Browse files Browse the repository at this point in the history
  • Loading branch information
yzy613 authored Nov 19, 2024
1 parent 910703e commit a19f2b4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions os/gcache/gcache_adapter_memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,7 @@ func (c *AdapterMemory) GetExpire(ctx context.Context, key interface{}) (time.Du
// If multiple keys are given, it returns the value of the last deleted item.
func (c *AdapterMemory) Remove(ctx context.Context, keys ...interface{}) (*gvar.Var, error) {
defer c.lru.Remove(keys...)
value, err := c.doRemove(ctx, keys...)
if err != nil {
return nil, err
}
return gvar.New(value), nil
return c.doRemove(ctx, keys...)
}

func (c *AdapterMemory) doRemove(_ context.Context, keys ...interface{}) (*gvar.Var, error) {
Expand Down

0 comments on commit a19f2b4

Please sign in to comment.