@refinio/one.models
    Preparing search index...

    This is a cache for aching raw channel elements

    When calling init() only number of 'batchSize' elements are loaded. Loading further elements is done when calling loadNextBatch.

    Updating the cache happens for two reasons:

    1. we want to grab more elements (loadNextBatch) -> load next batchSize elements.
    • use the previously stored iterator
    1. the history changed and we want to update oly messages before the last loaded element -> time parameter
    • iterate the new iterator up to a point where the history matches with the cache
    • iterate the remaining elements from the cache (faster - because the same)
    Index

    Constructors

    • Constructor

      Parameters

      • channelManager: default

        The channelmanager used to access the channel.

      • channelId: string

        The channelId of the channel to iterate.

      • owner: undefined | SHA256IdHash<Person>

        The owner of the channel to iterate.

      • batchSize: number

        The number of messages to load as one batch. Load the next batch with loadNextBatch().

      Returns default

    Properties

    onError: OEvent<(error: any) => void> = ...
    onUpdate: OEvent<(newMessages: boolean) => void> = ...

    Methods