* chore: Implement short-lived redis cache for slots * chore: adapt apiv2 redis service to match with upstash redis * chore: safer redis service and ms ttl * fixup! chore: safer redis service and ms ttl * Wrap with timeout, currently doesn't work yet * Updated @upstash/redis for better signal support * Fix type errors, remove ts value * Inject NoopRedisService for NODE_ENV test * chore: bump platform libs * chore: bump platform libs * Upstash Redis upgrade no longer resulted in expected hard crash on init, so updated factory and our Upstash Redis Adapter to mimick old behaviour * Add SLOTS_CACHE_TTL variable for configurable ttl on slots cache * Update parseInt to use right types * chore: bump platform libs * chore: bump platform libs * chore: bump platform libs * update e2e api v2 action * set SLOTS_CACHE_TTL env var api v2 e2e --------- Co-authored-by: cal.com <morgan@cal.com>
14 lines
460 B
TypeScript
14 lines
460 B
TypeScript
export interface IRedisService {
|
|
get: <TData>(key: string) => Promise<TData | null>;
|
|
|
|
set: <TData>(key: string, value: TData, opts?: { ttl?: number }) => Promise<"OK" | TData | null>;
|
|
|
|
expire: (key: string, seconds: number) => Promise<0 | 1>;
|
|
|
|
lrange: <TResult = string>(key: string, start: number, end: number) => Promise<TResult[]>;
|
|
|
|
lpush: <TData>(key: string, ...elements: TData[]) => Promise<number>;
|
|
|
|
del: (key: string) => Promise<number>;
|
|
}
|