struct ColumnsDataCache: Equatable { let data: [[BooruPost]] let columnCount: Int let posts: [BooruPost] static func == (lhs: Self, rhs: Self) -> Bool { guard lhs.columnCount == rhs.columnCount else { return false } guard lhs.posts.count == rhs.posts.count else { return false } guard !lhs.posts.isEmpty, !rhs.posts.isEmpty else { return lhs.posts.isEmpty == rhs.posts.isEmpty } guard lhs.posts.first?.id == rhs.posts.first?.id else { return false } guard lhs.posts.last?.id == rhs.posts.last?.id else { return false } return true } }