/// /// import { ExtensibleProperty } from "@gltf-transform/core"; import { Logger } from "@donmccurdy/caporal"; /** * Clear the cache. * This will remove all files in the cache directory. */ export declare function clearCache(logger?: Logger): void; export declare const cacheSizeLimit: number; /** * Ensure that the cache size does not exceed the given maximum size in MB. * @param maxSizeMB The maximum size in MB. */ export declare function limitCacheSize(maxSizeMB?: number): void; /** * Add data to the cache. * @param key The key to store the data under. * @param bytes The data to store as a Uint8Array. */ export declare function addToCache(key: string, bytes: Uint8Array | Buffer): void; /** * Try to get the data from the cache. * @param key The key to look up. * @returns The data as a Uint8Array or null if not found. * @throws If the cache file is corrupted. */ export declare function tryGetFromCache(key: string): Uint8Array | null; /** Add meta data to the cache. * @param key The key to store the meta data for. * @param meta The meta data object to store. It will be serialized to JSON and stored in a file with the key as the name with the extension ".meta". */ export declare function addMetaToCache(key: string, meta: object): void; /** Try to get the meta data from the cache. * @param key The key to look up. * @param ignoreVersion If true, the version check is skipped. If false, the version must match the current build pipeline version. * @returns The meta data object or null if not found. */ export declare function tryGetMetaFromCache(key: string, ignoreVersion?: boolean): object | null; /** * Get the cache key for a property. * @param property The property to get the key for. * @returns The key as a string. */ export declare function getKey(property: ExtensibleProperty): string; export declare function getKeyWithHash(property: ExtensibleProperty): { key: string; hash: string; }; /** * Get the hash for a property or an object. * @param property The property to get the hash for. * @param level The current level of recursion. * @returns The hash as a number. */ export declare function getHash(property: ExtensibleProperty | object, level?: number): string;