Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache struct manages items, expirations and clean ups
func NewCache ¶
NewCache creates new Cache with params and returns pointer of Cache and error cleanUpInterval used for deleting expired objects from cache.
type Item ¶
type Item struct { Object interface{} Expiration int64 }
Item struct keeps cache value and expiration time of object
type Range ¶
type Range int32
Range specifies range of cache
const ( // WithIn11KM The first decimal place is worth up to 11.1 km // eg: 41.3, 29.6 WithIn11KM Range = 1 + iota // WithIn1KM The second decimal place is worth up to 1.1 km // eg: 41.36, 29.63 WithIn1KM // WithIn110M The third decimal place is worth up to 110 m // eg: 41.367, 29.631 WithIn110M // WithIn11M The fourth decimal place is worth up to 11 m // eg: 41.3674, 29.6316 WithIn11M // WithIn1M The fifth decimal place is worth up to 1.1 m // eg: 41.36742, 29.63168 WithIn1M // WithIn11CM The sixth decimal place is worth up to 0.11 m // eg: 41.367421, 29.631689 WithIn11CM // WithIn11MM The seventh decimal place is worth up to 11 mm // eg: 41.3674211, 29.6316893 WithIn11MM // WithIn1MM The eighth decimal place is worth up to 1.1 mm // eg: 41.36742115, 29.63168932 WithIn1MM )
Click to show internal directories.
Click to hide internal directories.