Documentation
¶
Overview ¶
package cache provides a thread-safe key-value interface for persisting data to disk. Ideal use case is for caching data that is expensive to compute in devtools and unlikely to change. Do NOT use it to store sensitive information.
Index ¶
- type Cache
- func (c *Cache) Close() error
- func (c *Cache) DeleteAll() error
- func (c *Cache) DeleteKey(subpath, key string) error
- func (c *Cache) DeleteSubpath(subpath string) error
- func (c *Cache) Keys(subpath string) (iter.Seq[string], error)
- func (c *Cache) Load(subpath, key string, dst any) (bool, error)
- func (c *Cache) Store(subpath, key string, data any) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.