STRUCT
Cache
Contents
- Properties
profilespathversion
- Methods
init(profiles:path:version:)cache(profiles:path:version:)
swift
public struct Cache: Codable, HashableA cache configuration.
Properties
profiles
swift
public var profiles: [Profile]A list of the cache profiles.
path
swift
public var path: FilePath?The path where the cache will be stored, if nil it will be a default location in a shared directory.
version
swift
public var version: String?Unique identifier of cached artifacts. Can be used to invalidate cache if needed.
Methods
init(profiles:path:version:)
swift
public init(profiles: [Profile], path: AbsolutePath?, version: String? = nil)cache(profiles:path:version:)
swift
public static func cache(profiles: [Profile] = [], path: FilePath? = nil, version: String? = nil) -> CacheReturns a Cache instance containing the given profiles. If no profile list is provided, geko's default profile will be taken as the default. If no profile is provided in geko cache --profile command, the first profile from the profiles list will be taken as the default.
- Parameters:
- profiles: Profiles to be chosen from
- path: The path where the cache will be stored, if
nilit will be a default location in a shared directory. - version: Unique identifier of cached artifacts. Can be used to invalidate cache if needed.
- Returns: The
Cacheinstance
Parameters
| Name | Description |
|---|---|
| profiles | Profiles to be chosen from |
| path | The path where the cache will be stored, if nil it will be a default location in a shared directory. |
| version | Unique identifier of cached artifacts. Can be used to invalidate cache if needed. |
