github.com/wangyougui/gf/v2@v2.6.5/os/gcache/gcache_adapter_memory_item.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/wangyougui/gf. 6 7 package gcache 8 9 import ( 10 "github.com/wangyougui/gf/v2/os/gtime" 11 ) 12 13 // IsExpired checks whether `item` is expired. 14 func (item *adapterMemoryItem) IsExpired() bool { 15 // Note that it should use greater than or equal judgement here 16 // imagining that the cache time is only 1 millisecond. 17 18 return item.e < gtime.TimestampMilli() 19 }