Skip to content

GetOrSet doesn't update expManager #66

Open
@reitowo

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.

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