buildcache
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
var (// CreateDirErr error occurred when creating the cache directoryCreateDirErr = cacheError{Code: createDirErrCode}// FileWriteErr error occurred when writing the placeholder fileFileWriteErr = cacheError{Code: fileWriteErrCode})
Functions¶
This section is empty.
Types¶
typeBuildCache¶
type BuildCache struct {// contains filtered or unexported fields}BuildCache represents a cache of built files (sketches and cores), it's designedto work on directories. Given a directory as "base" it handles direct subdirectories askeys
func (*BuildCache)GetOrCreate¶
func (bc *BuildCache) GetOrCreate(keystring) (*paths.Path,error)
GetOrCreate retrieves or creates the cache directory at the given pathIf the cache already exists the lifetime of the cache is extended.
func (*BuildCache)Purge¶
func (bc *BuildCache) Purge(ttltime.Duration)
Purge removes all cache directories within baseDir that have expiredTo know how long ago a directory has been last usedit checks into the .last-used file.