Documentation
¶
Index ¶
- func Get(t Type, key string, i any) (bool, error)
- func GetIPParseResult(ipStr string) (result model.IPParseResult, found bool, err error)
- func InitCache()
- func Set(t Type, key string, value interface{}, expiration ...time.Duration) error
- func SetCache(cache Cache)
- func SetIPParseResult(ipStr string, ip model.IPParseResult) error
- type Cache
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIPParseResult ¶
func GetIPParseResult(ipStr string) ( result model.IPParseResult, found bool, err error, )
GetIPParseResult returns the cached result of an ip parsing
func InitCache ¶ added in v0.10.0
func InitCache()
InitCache initializes the cache according to the configuration
func SetIPParseResult ¶
func SetIPParseResult(ipStr string, ip model.IPParseResult) error
SetIPParseResult caches the result of an ip parsing
Types ¶
Click to show internal directories.
Click to hide internal directories.