Today, we use two LRU versions:
"github.com/hnlq715/golang-lru"
"github.com/hashicorp/golang-lru"
we use the hnlq715 package, because it supports timed expiry, but the hashicorp package would be preferable due to its wider adoption and active maintenance.
as of hashicorp/golang-lru/v2 hashicorp now supports timed expiry, so there is no longer a need to use the hnlq715 package. hashicorp v2 uses generics though, so there is some amount of refactoring required to perform the upgrade.
Today, we use two LRU versions: "github.com/hnlq715/golang-lru" "github.com/hashicorp/golang-lru"
we use the
hnlq715
package, because it supports timed expiry, but thehashicorp
package would be preferable due to its wider adoption and active maintenance.as of
hashicorp/golang-lru/v2
hashicorp now supports timed expiry, so there is no longer a need to use thehnlq715
package. hashicorp v2 uses generics though, so there is some amount of refactoring required to perform the upgrade.