import { KeyValueCache } from "@here/olp-sdk-core"; import { MetadataApi } from "@here/olp-sdk-dataservice-api"; import { PartitionsRequest } from "../client"; /** * Caches the partitions metadata using a key-value pair. */ export declare class MetadataCacheRepository { private readonly cache; /** * Generates the [[MetadataCacheRepository]] instance. * * @param cache The [[KeyValueCache]] instance. * @return The [[MetadataCacheRepository]] instance. */ constructor(cache: KeyValueCache); /** * Stores a key-value pair in the cache. * * @return True if the operation is successful, false otherwise. */ put(rq: PartitionsRequest, hrn: string, layerId: string, partitions: MetadataApi.Partition[], version?: number): boolean; /** * Gets a metadata from the cache. * * @param service The name of the API service for which you want to get the base URL. * @param serviceVersion The service version. * @return The base URL of the service, or undefined if the base URL does not exist. */ get(rq: PartitionsRequest, hrn: string, layerId: string, version?: number): MetadataApi.Partition[] | undefined; private createKey; /** * Checks all cached partitions with additional fields. * * @param cachedPartitions The array of the cached partitions * @param additionalFields the array of the requested additional fields. * @returns True if some of the cached partition does not have some additional field. * False otherwise or if any additionalFields has not been requested. */ private checkAdditionalFieldsAvailable; }