Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // CreateDirErr error occurred when creating the cache directory CreateDirErr = cacheError{Code: createDirErrCode} // FileWriteErr error occurred when writing the placeholder file FileWriteErr = cacheError{Code: fileWriteErrCode} )
Functions ¶
This section is empty.
Types ¶
type BuildCache ¶
type BuildCache struct {
// contains filtered or unexported fields
}
BuildCache represents a cache of built files (sketches and cores), it's designed to work on directories. Given a directory as "base" it handles direct subdirectories as keys
func (*BuildCache) GetOrCreate ¶
func (bc *BuildCache) GetOrCreate(key string) (*paths.Path, error)
GetOrCreate retrieves or creates the cache directory at the given path If the cache already exists the lifetime of the cache is extended.
func (*BuildCache) Purge ¶
func (bc *BuildCache) Purge(ttl time.Duration)
Purge removes all cache directories within baseDir that have expired To know how long ago a directory has been last used it checks into the .last-used file.
Click to show internal directories.
Click to hide internal directories.