RecordSet


STRUCT

RecordSet

Swift
1public struct RecordSet: Hashable

A set of cache records.

Properties

storage

Swift
1public private(set) var storage: [CacheKey: Record] = [:]

isEmpty

Swift
1public var isEmpty: Bool

keys

Swift
1public var keys: Set<CacheKey>

Methods

init(records:)

Swift
1public init<S: Sequence>(records: S) where S.Iterator.Element == Record

insert(_:)

Swift
1public mutating func insert(_ record: Record)

removeRecord(for:)

Swift
1public mutating func removeRecord(for key: CacheKey)

removeRecords(matching:)

Swift
1public mutating func removeRecords(matching pattern: CacheKey)

clear()

Swift
1public mutating func clear()

insert(contentsOf:)

Swift
1public mutating func insert<S: Sequence>(contentsOf records: S) where S.Iterator.Element == Record

merge(records:)

Swift
1@discardableResult public mutating func merge(records: RecordSet) -> Set<CacheKey>

merge(record:)

Swift
1@discardableResult public mutating func merge(record: Record) -> Set<CacheKey>
Feedback

Edit on GitHub

Forums