1 2 3 4 5 6 7 8 9 10 11 12 13 14
import Foundation class BooruPageCacheEntry { let posts: [BooruPost] let timestamp: Date var isExpired: Bool { Date().timeIntervalSince(timestamp) > 300 } init(posts: [BooruPost], timestamp: Date) { self.posts = posts self.timestamp = timestamp } }