mirror of
https://github.com/hyperoslo/Cache.git
synced 2026-04-07 19:17:36 +00:00
18 lines
404 B
Swift
18 lines
404 B
Swift
import Foundation
|
|
|
|
/// A wrapper around cached object and its expiry date.
|
|
public struct Entry<T> {
|
|
/// Cached object
|
|
public let object: T
|
|
/// Expiry date
|
|
public let expiry: Expiry
|
|
/// File path to the cached object
|
|
public let filePath: String?
|
|
|
|
init(object: T, expiry: Expiry, filePath: String? = nil) {
|
|
self.object = object
|
|
self.expiry = expiry
|
|
self.filePath = filePath
|
|
}
|
|
}
|