Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatCacheDir ¶
Types ¶
type CacheConfig ¶
type CacheConfig struct {
rs.BaseField `yaml:"-"`
// EnableCache activates caching support
// for renderers with remote fetch, it will cache it on local disk
// and cache_size_limit is not effective in that case
//
// Defaults to false
EnableCache bool `yaml:"enable_cache"`
// CacheSizeLimit limits maximum in memory size of cache
CacheSizeLimit utils.Size `yaml:"cache_size_limit"`
// CacheMaxAge limits maximum data cache time
CacheMaxAge time.Duration `yaml:"cache_max_age"`
}
CacheConfig is the config for cache control
type CacheRefreshFunc ¶
func CreateRefreshFuncForRemote ¶
func CreateRefreshFuncForRemote( cacheDir string, maxCacheAge time.Duration, doRemoteFetch CacheRefreshFunc, ) CacheRefreshFunc
Click to show internal directories.
Click to hide internal directories.