Documentation ¶
Overview ¶
Package filecache provides an implementation of prototransform.Cache that is based on the file system. Cached data is stored in and loaded from files, with cache keys being used to form the file names.
This is the simplest form of caching when sharing cache results is not needed and the workload has a persistent volume (e.g. if the application restarts, it will still have access to the same cache files written before it restarted).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Required: the folder in which cached files live. Path string // Defaults to "cache_" if left empty. This is added to the // cache key and the extension below to form a file name. // A trailing underscore is not necessary and will be added // if not present (to separate prefix from the rest of the // cache key). FilenamePrefix string // Defaults to ".bin" if left empty. This is added to the // cache key and prefix above to form a file name. FilenameExtension string // The mode to use when creating new files in the cache // directory. Defaults to 0600 if left zero. If not left // as default, the mode must have at least bits 0400 and // 0200 (read and write permissions for owner) set. FileMode fs.FileMode }
Config represents the configuration parameters used to create a new file-system-backed cache.
Click to show internal directories.
Click to hide internal directories.