Skip to content

GetOrSet doesn't update expManager #66

Description

@reitowo

go-generics-cache/cache.go

Lines 235 to 245 in f567a86

if !ok || item.Expired() {
item := newItem(key, val, opts...)
c.cache.Set(key, item)
return val, false
}
return item.Value, true
}
// DeleteExpired all expired items from the cache.

GetOrSet doesn't respect expire setting and will not be removed even expired.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions