Skip to content

v2.0.0

Latest
Compare
Choose a tag to compare
@iuioiua iuioiua released this 08 Oct 22:31
· 40 commits to main since this release
9049602

Previously, this module only consisted of pure functions. This release introduces the RedisClient class that uses these same functions under the hood, alongside a new simple queueing mechanism that fixes previous issues with race conditions during concurrent task execution. To migrate, replace functions with RedisClient methods.

Before:

import { sendCommand } from "https://deno.land/x/r2d2/mod.ts";

const redisConn = await Deno.connect({ port: 6379 });

// Returns "OK"
await sendCommand(redisConn, ["SET", "hello", "world"]);

// Returns "world"
await sendCommand(redisConn, ["GET", "hello"]);

After:

import { RedisClient } from "https://deno.land/x/r2d2/mod.ts";

const redisConn = await Deno.connect({ port: 6379 });
const redisClient = new RedisClient(redisConn);

// Returns "OK"
await redisClient.sendCommand(["SET", "hello", "world"]);

// Returns "world"
await redisClient.sendCommand(["GET", "hello"]);

What's Changed

New Contributors

Full Changelog: v1.1.11...v2.0.0