mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
* refactor: remove obvious comments * docs: minor comments * docs: make it clear that cache folders cannot be removed
19 lines
469 B
Go
19 lines
469 B
Go
package plan
|
|
|
|
const (
|
|
CacheTypeShared = "shared"
|
|
CacheTypeLocked = "locked"
|
|
)
|
|
|
|
type Cache struct {
|
|
Directory string `json:"directory,omitempty" jsonschema:"description=The directory to cache"`
|
|
Type string `json:"type,omitempty" jsonschema:"enum=shared,enum=locked,default=shared,description=The type of cache (either 'shared' or 'locked')"`
|
|
}
|
|
|
|
func NewCache(directory string) *Cache {
|
|
return &Cache{
|
|
Directory: directory,
|
|
Type: CacheTypeShared,
|
|
}
|
|
}
|