Skip to content

Commit

Permalink
expose the pageCleanUpOffset parameter (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavFitz authored Dec 10, 2021
1 parent 9ff055a commit 1341c42
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Sources/InstantSearchCore/Hits/HitsInteractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ public class HitsInteractor<Record: Codable>: AnyHitsInteractor {
}

}

/// Value defines how many pages of hits might be kept in memory
/// before and after the current page
/// When set `nil`, all the fetched pages will stay in memory
/// Default value: 3
public var pageCleanUpOffset: Int? {
get {
return paginator.pageCleanUpOffset
}

set {
paginator.pageCleanUpOffset = newValue
}
}

convenience public init(infiniteScrolling: InfiniteScrolling = Constants.Defaults.infiniteScrolling,
showItemsOnEmptyQuery: Bool = Constants.Defaults.showItemsOnEmptyQuery) {
Expand Down

0 comments on commit 1341c42

Please sign in to comment.