@@ -25,13 +25,13 @@ import (
2525
2626const lastUsedFileName = ".last-used"
2727
28- type buildCache struct {
28+ type BuildCache struct {
2929 baseDir * paths.Path
3030}
3131
3232// GetOrCreate retrieves or creates the cache directory at the given path
3333// If the cache already exists the lifetime of the cache is extended.
34- func (bc * buildCache ) GetOrCreate (key string ) (* paths.Path , error ) {
34+ func (bc * BuildCache ) GetOrCreate (key string ) (* paths.Path , error ) {
3535 keyDir := bc .baseDir .Join (key )
3636 if err := keyDir .MkdirAll (); err != nil {
3737 return nil , err
@@ -46,7 +46,7 @@ func (bc *buildCache) GetOrCreate(key string) (*paths.Path, error) {
4646// Purge removes all cache directories within baseDir that have expired
4747// To know how long ago a directory has been last used
4848// it checks into the .last-used file.
49- func (bc * buildCache ) Purge (ttl time.Duration ) {
49+ func (bc * BuildCache ) Purge (ttl time.Duration ) {
5050 files , err := bc .baseDir .ReadDir ()
5151 if err != nil {
5252 return
@@ -59,8 +59,8 @@ func (bc *buildCache) Purge(ttl time.Duration) {
5959}
6060
6161// New instantiates a build cache
62- func New (baseDir * paths.Path ) * buildCache {
63- return & buildCache {baseDir }
62+ func New (baseDir * paths.Path ) * BuildCache {
63+ return & BuildCache {baseDir }
6464}
6565
6666func removeIfExpired (dir * paths.Path , ttl time.Duration ) {
0 commit comments