Skip to content

STRUCT

CacheProfile

Contents

swift
public struct CacheProfile: Codable, Equatable, Sendable

Properties

base

swift
public let base: BaseCacheProfile

The base cache replacement policy

targetQueries

swift
public let targetQueries: [TargetQuery]

Target names or tags to replace with cached binaries (in addition to base behavior). Use .named("MyTarget") or .tagged("MyTag").

String literals like "MyTarget" and "tag:MyTag" are supported via ExpressibleByStringLiteral.

exceptTargetQueries

swift
public let exceptTargetQueries: [TargetQuery]

Target names or tags to exclude from binary caching. These exceptions override both the base profile behavior and any targets specified in targetQueries. Use .named("MyTarget") or .tagged("MyTag").

String literals like "MyTarget" and "tag:MyTag" are supported via ExpressibleByStringLiteral.

Methods

profile(_:and:except:)

swift
public static func profile(
    _ base: BaseCacheProfile = .onlyExternal,
    and targetQueries: [TargetQuery] = [],
    except exceptTargetQueries: [TargetQuery] = []
) -> Self

Released under the MIT License.