UNPKG

@kth/cortina-block

Version:

Node.js module for fetching Cortina blocks and optionally cache using Redis.

11 lines (10 loc) 450 B
import { BlocksObject, Redis, SupportedLang } from './types'; export declare function getRedisItem<T>(redis: Redis, redisKey: string, lang: SupportedLang): Promise<T | undefined>; /** * Wrap Redis set call in a Promise. * @param config * @param blocks * @returns {Promise} * @private */ export declare function setRedisItem(redis: Redis, redisKey: string, redisExpire: number, lang: SupportedLang, blocks: BlocksObject): Promise<BlocksObject>;