UNPKG

@fortedigital/nextjs-cache-handler

Version:
25 lines (23 loc) 751 B
/** * Returns a client info tag string for Redis client identification. * * This function reads the version from `@fortedigital/nextjs-cache-handler/package.json` * and returns a formatted string like `nextjs-cache-handler_v2.5.1`. * * If the version cannot be read, it falls back to `nextjs-cache-handler`. * * @example * ```js * import { createClient } from 'redis'; * import { getClientInfoTag } from '@fortedigital/nextjs-cache-handler/helpers/getClientInfoTag'; * * const client = createClient({ * url: 'redis://localhost:6379', * clientInfoTag: getClientInfoTag(), * }); * ``` * * @returns The client info tag string for Redis identification. */ declare function getClientInfoTag(): string; export { getClientInfoTag };