mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
179 B
Go
13 lines
179 B
Go
2 years ago
|
package synccache
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
type entry[V any] struct {
|
||
|
expiration time.Time
|
||
|
value V
|
||
|
}
|
||
|
|
||
|
func (e *entry[V]) IsExpired() bool {
|
||
|
return time.Now().After(e.expiration)
|
||
|
}
|