summaryrefslogtreecommitdiff
path: root/Sora/Data/Booru/BooruPageCacheEntry.swift
blob: 1406ed20065a929be8157c0373102f5aae434e06 (plain) (blame)
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
  }
}