Raddish - Redis-like Cache & Networking for Roblox

Raddish - Redis-like Cache & Networking for Roblox

Wally Creator Store GitHub License Documentation

TL;DR: Raddish is a high-performance, Redis-inspired caching and networking system for Roblox that’s 100-1000x faster than DataStore for frequently accessed data.


:rocket: What is Raddish?

Raddish brings Redis-like functionality to Roblox, providing blazing-fast in-memory caching, cross-server pub/sub, and powerful networking utilities - all in one lightweight module.

Key Features

  • :high_voltage: Lightning-Fast Cache - 100-1000x faster than DataStore with automatic TTL expiration
  • :counterclockwise_arrows_button: Cross-Server Pub/Sub - Real-time event broadcasting via MessagingService
  • :bar_chart: Redis Data Structures - Hashes, Lists, Sets, and Sorted Sets
  • :floppy_disk: DataStore Bridge - Automatic syncing with write-through/write-back modes
  • :globe_with_meridians: HTTP Client - Built-in external API support with caching and retry logic
  • :shield: Rate Limiting - Automatic protection for all services
  • :broom: LRU Eviction - Smart memory management (configurable max capacity)

:package: Installation

Via Roblox Creator Store

:inbox_tray: Get Raddish on Creator Store

Click the link above, then insert into ReplicatedStorage in Studio.

Via Wally (Recommended for Developers)

[dependencies] Raddish = "verifiedhawaii/raddish@1.0.1" 

Then run:

wally install 

Manual Download

Download from GitHub Releases


:fire: Quick Examples

Basic Caching
local Raddish = require(game.ReplicatedStorage.Raddish) -- Cache player data with 5-minute TTL Raddish.Set("player:123:coins", 1000, 300) -- Retrieve from cache local coins = Raddish.Get("player:123:coins") print(coins) -- 1000 -- Atomic increment Raddish.Incr("player:123:coins", 50) print(Raddish.Get("player:123:coins")) -- 1050 
Cross-Server Events (Pub/Sub)
-- Subscribe to global events Raddish.Subscribe("server:shutdown", function(data) print("Server shutting down:", data.reason) -- Gracefully save player data end) -- Publish to all servers Raddish.Publish("server:shutdown", { reason = "Maintenance", duration = 30 }) 
Leaderboards with Sorted Sets
-- Add player scores Raddish.ZAdd("global:leaderboard", 1500, "Player1") Raddish.ZAdd("global:leaderboard", 2300, "Player2") Raddish.ZAdd("global:leaderboard", 1800, "Player3") -- Get top 10 players local top10 = Raddish.ZRange("global:leaderboard", 1, 10, true) for rank, entry in ipairs(top10) do print(rank, entry.member, entry.score) end -- Output: -- 1 Player2 2300 -- 2 Player3 1800 -- 3 Player1 1500 
DataStore Integration
-- Automatically cache DataStore reads local playerData = Raddish.GetWithCache( myDataStore, "player_123", 300 -- Cache for 5 minutes ) -- Write-through cache (updates both cache and DataStore) Raddish.SetWithCache( myDataStore, "player_123", playerData, 300 ) 
HTTP Requests with Caching
-- Fetch external API with automatic caching local response = Raddish.HttpGet("https://api.example.com/data", { cache = true, cacheTTL = 600, -- Cache for 10 minutes headers = { ["Authorization"] = "Bearer token123" } }) if response.Success then print(response.Body) else warn("Request failed:", response.StatusCode) end 

:bullseye: Use Cases

1. Session Data

Store temporary player data that doesn’t need DataStore persistence:

-- Store active session Raddish.HSet("session:" .. player.UserId, "joinTime", os.time()) Raddish.HSet("session:" .. player.UserId, "lastAction", "Lobby") Raddish.Expire("session:" .. player.UserId, 3600) -- 1 hour TTL 
2. Rate Limiting

Prevent spam and abuse:

local key = "ratelimit:chat:" .. player.UserId local count = Raddish.Incr(key) if count == 1 then Raddish.Expire(key, 60) -- Reset every minute end if count > 10 then return -- Player exceeded 10 messages per minute end 
3. Real-time Leaderboards

Update and query leaderboards instantly:

-- Update score Raddish.ZAdd("weekly:kills", kills, player.Name) -- Get player rank local rank = Raddish.ZRank("weekly:kills", player.Name, true) print(player.Name .. " is rank #" .. rank) 
4. Cross-Server Coordination

Synchronize events across all servers:

-- Subscribe in all servers Raddish.Subscribe("game:event:started", function(data) -- Start event in this server startEvent(data.eventType) end) -- Trigger from one server Raddish.Publish("game:event:started", { eventType = "Boss Fight" }) 

:bar_chart: Performance Comparison

Operation DataStore Raddish Cache Speedup
Get ~50-200ms ~0.1-1ms 100-2000x
Set ~50-200ms ~0.1-1ms 100-2000x
Increment ~100-300ms ~0.1-1ms 200-3000x
Sorted Set Query N/A ~1-5ms ∞ (not possible)

Note: Cache performance is for frequently accessed data. DataStore is still required for persistence.


:hammer_and_wrench: API Overview

Cache Operations
  • Set(key, value, ttl?) - Store with optional TTL
  • Get(key) - Retrieve value
  • Del(key) - Delete key
  • Exists(key) - Check if key exists
  • Expire(key, ttl) - Set expiration
  • TTL(key) - Get remaining TTL
  • Incr/Decr(key, amount?) - Atomic increment/decrement
Data Structures
  • Hashes: HSet, HGet, HGetAll, HDel
  • Lists: LPush, RPush, LPop, RPop, LRange
  • Sets: SAdd, SRem, SMembers, SIsMember
  • Sorted Sets: ZAdd, ZRem, ZRange, ZRank, ZScore
Pub/Sub
  • Subscribe(channel, callback) - Listen for events
  • Publish(channel, data) - Broadcast event
  • Unsubscribe(channel, callback?) - Stop listening
  • GetHistory(channel, limit?) - Get recent messages
Networking
  • HttpGet/Post/Put/Delete/Patch(url, options?) - HTTP requests
  • HttpBatch(requests) - Batch multiple requests
  • SendDiscordWebhook(url, data) - Discord integration
DataStore Bridge
  • GetWithCache(dataStore, key, ttl?) - Cached reads
  • SetWithCache(dataStore, key, value, ttl?) - Write-through
  • IncrementWithCache(dataStore, key, delta, ttl?) - Cached increment

:books: Documentation

Full documentation available at: https://docs.hawaiian.gg/raddish/getting-started

GitHub Repository: GitHub - VerifiedHawaii/Raddish: A roblox version of Redis


:handshake: Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit pull requests
  • Improve documentation

:page_facing_up: License

MIT License - Free to use in commercial and personal projects.


Made with :heart: by @VerifiedHawaii