chamesu
Version:
This package contains all packages of the chat application.
21 lines (15 loc) • 453 B
text/typescript
/*
* Copyright (c) 2022.
* Author Peter Placzek (tada5hi)
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
import {Redis} from "ioredis";
let redisCache : Redis | undefined;
export function useRedisCache(redisDatabase?: Redis) : Redis {
if(typeof redisCache !== 'undefined') {
return redisCache;
}
redisCache = redisDatabase;
return redisCache;
}