/// <reference types="node" />
import { DfsCacheInterface } from '@evan.network/dbcp';
/**
 * in-memory cache for DFS requests,
 * that allows to keep retrieved items once and skip external requests in DFS
 *
 * @class      InMemoryCache (name)
 */
export declare class InMemoryCache implements DfsCacheInterface {
    private cache;
    constructor();
    /**
     * add a file to the cache
     *
     * @param      {string}           hash    filename
     * @param      {Buffer}           data    file content as Buffer
     * @return     {Promise<string>}  reference to the file in the DFS, format may differ depending on
     *                                the type of DFS
     */
    add(hash: string, data: any): Promise<void>;
    /**
     * get a file from the dfs
     *
     * @param      {string}           hash    reference to the file in the DFS, format may differ
     *                                        depending on the type of DFS
     * @return     {Promise<Buffer>}  file content as buffer
     */
    get(hash: string): Promise<Buffer>;
}
