@web/redis
v1.0.0
MIT
.cap
✓ Verified by capdux.org
AI-First .d.cp
Official thin Redis lifecycle, distributed namespace key builder, and zero-heap RESP2/3 command encoder plugin for cap:web
Install with Cap
$ cap add @web/redis
AI Interface Stub .d.cp
// Type definitions for CP
import { App, AppMethod, Context, Response, Plugin, PluginScope } from "../../../../lib/web/app.cp";
export class RedisPluginConfig {
host: string,
port: u16,
key_prefix: string,
ping_path: string,
}
export fn rdsDefaultPing(cfg: &RedisPluginConfig): bool;
export fn rdsIsSafeKeySegment(s: string): bool;
export fn rdsWriteByte(out_buf: []u8, pos: &mut usize, b: u8): bool;
export fn rdsWriteRaw(out_buf: []u8, pos: &mut usize, s: string): bool;
export fn rdsWriteUsize(out_buf: []u8, pos: &mut usize, val: usize): bool;
export fn redisBuildKey(prefix: string, namespace: string, key: string, out_buf: []u8): usize?;
export fn redisEncodeRespCommand(args: &[]string, out_buf: []u8): usize?;
export fn rdsPingHandler(ctx: &mut Context): Response;
export fn createRedisPlugin(cfg: RedisPluginConfig, ping_fn: RedisPingFn): Plugin;
export fn registerRedisWithPing(app: &mut App, cfg: RedisPluginConfig, ping_fn: RedisPingFn): &mut App;
export fn registerRedis(app: &mut App, cfg: RedisPluginConfig): &mut App;
README
MarkdownNo README provided for this package version.
Version History
1 release| Version | Format / Size | Integrity (SHA-256) | Downloads | Published | Status |
|---|---|---|---|---|---|
| v1.0.0 | .cap · 3.3 KB | sha256-833cca93c05772ea… | 0 | 2026-11-26 | latest |