@freedomofpress/webcat
    Preparing search index...

    Function isInPartition

    • Checks whether a given CacheKey is in the specified partition.

      Type Parameters

      • P extends { [index: string]: { toString(): string } }

        The type of the partition attribute object to check against.

      • T extends { [index: string]: { toString(): string } }

        The type of the cache partition attributes of the key.

      Parameters

      • key: CacheKey<T>

        The key to check.

      • partition: P

        The cache partition attributes.

      Returns boolean

      true if the key has the specified attributes, i.e. is in the partition; false otherwise.