• 根据key获取缓存数据

    Parameters

    • key: string

      唯一标识

    • cacheType: CacheType = 'local'

      缓存类型 'local'(默认) / cookie / session;

    Returns string | {
        [key: string]: any;
    }

    返回key对应的缓存值,若找不到返回空字符串

    Example

    import { cache } from "@pointclous/pcloud-utils";
    const info1 = cache.getCache('person', 'session');
    const info2 = cache.getCache('person', 'local');
    const info2 = cache.getCache('person', 'cookie');

Generated using TypeDoc