25 lines
548 B
TypeScript
25 lines
548 B
TypeScript
import { createClient } from "redis";
|
|
|
|
import zlib from "zlib";
|
|
|
|
const client = createClient({
|
|
url: "redis:PORT",
|
|
});
|
|
|
|
client.on("error", (err) => console.log("Redis Client Error", err));
|
|
|
|
async function addToCache(key: string, value: Object): Promise<boolean> {
|
|
throw new Error("Unable to post to cache");
|
|
}
|
|
|
|
async function getFromCache(key: string): Promise<Object> {
|
|
throw new Error("Unable to retreive");
|
|
}
|
|
/*
|
|
await client.connect();
|
|
|
|
await client.set('key', 'value');
|
|
const value = await client.get('key');
|
|
await client.disconnect();
|
|
*/
|