Versions in this module Expand all Collapse all v0 v0.153.0 Oct 12, 2026 Changes in this version + const CacheKeyAssets + const CacheKeyGetCSV + const CacheKeyGetJSON + const CacheKeyGetResource + const CacheKeyImages + const CacheKeyMisc + const CacheKeyModules + const FilecacheRootDirname + var ErrFatal = errors.New("fatal filecache error") + type Cache struct + Fs afero.Fs + func NewCache(fs afero.Fs, maxAge time.Duration, pruneAllRootDir string) *Cache + func (c *Cache) AsHTTPCache() httpcache.Cache + func (c *Cache) Get(id string) (ItemInfo, io.ReadCloser, error) + func (c *Cache) GetBytes(id string) (ItemInfo, []byte, error) + func (c *Cache) GetOrCreate(id string, create func() (io.ReadCloser, error)) (ItemInfo, io.ReadCloser, error) + func (c *Cache) GetOrCreateBytes(id string, create func() ([]byte, error)) (ItemInfo, []byte, error) + func (c *Cache) GetString(id string) string + func (c *Cache) NamedLock(id string) func() + func (c *Cache) Prune(force bool) (int, error) + func (c *Cache) ReadOrCreate(id string, read func(info ItemInfo, r io.ReadSeeker) error, ...) (info ItemInfo, err error) + func (c *Cache) WriteCloser(id string) (ItemInfo, io.WriteCloser, error) + type Caches map[string]*Cache + func NewCaches(p *helpers.PathSpec) (Caches, error) + func (c Caches) Prune() (int, error) + func (f Caches) AssetsCache() *Cache + func (f Caches) Get(name string) *Cache + func (f Caches) GetCSVCache() *Cache + func (f Caches) GetJSONCache() *Cache + func (f Caches) GetResourceCache() *Cache + func (f Caches) ImageCache() *Cache + func (f Caches) MiscCache() *Cache + func (f Caches) ModulesCache() *Cache + type Configs map[string]FileCacheConfig + func DecodeConfig(fs afero.Fs, bcfg config.BaseConfig, m map[string]any) (Configs, error) + func (c Configs) CacheDirModules() string + type FileCacheConfig struct + Dir string + DirCompiled string + IsResourceDir bool + MaxAge time.Duration + type ItemInfo struct + Name string