SwiftclassPrivateCloudComputeDaemon

class PrivateCloudComputeDaemon.LRUCache

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

Members 15

  1. deinitdeinit
  2. fieldlet decoder: Foundation.PropertyListDecoder
  3. fieldlet encoder: Foundation.PropertyListEncoder
  4. fieldlet maxAge: Double+0x18
  5. fieldlet maxCount: Int+0x10
  6. fieldlet state: Synchronization.Mutex<PrivateCloudComputeDaemon.LRUCache<A>.State>
  7. fieldlet storeURL: Foundation.URL?
  8. funcaddToCache(now: Foundation.Date, value: A) -> Bool
  9. funcdeleteSavedState() -> ()
  10. funcgetCachedEntries(now: Foundation.Date) -> [A]
  11. funcloadState(now: Foundation.Date) -> ()
  12. funcsaveState(now: Foundation.Date) -> ()
  13. funcstatistics(now: Foundation.Date) -> (count: Int, oldestAgeInDays: Int)
  14. initPrivateCloudComputeDaemon.LRUCache.__allocating_init(maxCount: Int, maxAge: Double, storeURL: Foundation.URL?) -> PrivateCloudComputeDaemon.LRUCache<A>
  15. typealiastypealias Value = A
class LRUCache<A> where A: Swift.Decodable, A: Swift.Encodable, A: Swift.Hashable {
    struct State {
        var memCache: [PrivateCloudComputeDaemon.LRUCache<A>.DatedValue]
    }
    struct DatedValue {
        enum CodingKeys {
            case date
            case value
        }
        var date: Foundation.Date
        var value: A
    }
    let maxCount: Swift.Int
    let maxAge: Swift.Double
    let storeURL: Foundation.URL?
    let encoder: Foundation.PropertyListEncoder
    let decoder: Foundation.PropertyListDecoder
    let state: Synchronization.Mutex<PrivateCloudComputeDaemon.LRUCache<A>.State>

    init(maxCount: Swift.Int, maxAge: Swift.Double, storeURL: Foundation.URL?)

    final func addToCache(now: Foundation.Date, value: A) -> Swift.Bool
    final func statistics(now: Foundation.Date) -> (count: Swift.Int, oldestAgeInDays: Swift.Int)
    final func deleteSavedState()
    final func getCachedEntries(now: Foundation.Date) -> [A]
    final func loadState(now: Foundation.Date)
    final func saveState(now: Foundation.Date)

    deinit
}