Skip to content

Getting Started ​

Installation ​

Option 1: Manual Installation ​

  1. Download the Raddish module files
  2. Create the following structure in Studio:
ReplicatedStorage/
└── Raddish/
    ├── Raddish.lua (main module)
    └── mods/
        └── NetworkingModule.lua
  1. Require the module in your scripts:
lua
local Raddish = require(game.ReplicatedStorage.Raddish)

Option 2: Model File ​

  1. Get the Raddish model from the Roblox Library
  2. Insert it into ReplicatedStorage
  3. Require it:
lua
local Raddish = require(game.ReplicatedStorage.Raddish)

Basic Usage ​

Storing and Retrieving Data ​

lua
local Raddish = require(game.ReplicatedStorage.Raddish)

-- Store a value
Raddish.Set("mykey", "myvalue")

-- Get a value
local value = Raddish.Get("mykey")
print(value) -- "myvalue"

-- Store with expiration (TTL in seconds)
Raddish.Set("tempkey", "temporary", 60) -- Expires in 60 seconds

-- Check if key exists
if Raddish.Exists("mykey") then
    print("Key exists!")
end

-- Delete a key
Raddish.Delete("mykey")

Working with Player Data ​

lua
game.Players.PlayerAdded:Connect(function(player)
    -- Store player data
    Raddish.Set("player:" .. player.UserId .. ":coins", 0)
    Raddish.Set("player:" .. player.UserId .. ":level", 1)
    
    -- Get player data
    local coins = Raddish.Get("player:" .. player.UserId .. ":coins")
    print(player.Name .. " has " .. coins .. " coins")
end)

game.Players.PlayerRemoving:Connect(function(player)
    -- Clean up player data
    Raddish.Delete("player:" .. player.UserId .. ":coins")
    Raddish.Delete("player:" .. player.UserId .. ":level")
end)

Increment/Decrement ​

lua
-- Increment a counter
Raddish.Set("visits", 0)
Raddish.Incr("visits") -- 1
Raddish.Incr("visits") -- 2
Raddish.Incr("visits") -- 3

-- Decrement
Raddish.Decr("lives") -- -1

Pattern Matching ​

lua
-- Set multiple keys
Raddish.Set("user:1:name", "Alice")
Raddish.Set("user:2:name", "Bob")
Raddish.Set("user:3:name", "Charlie")

-- Find all user name keys
local userKeys = Raddish.Keys("user:*:name")
for _, key in ipairs(userKeys) do
    print(key, Raddish.Get(key))
end
-- Output:
-- user:1:name Alice
-- user:2:name Bob
-- user:3:name Charlie

Next Steps ​

Configuration ​

You can configure Raddish by modifying these values in the respective modules:

CacheManager Configuration ​

lua
-- In CacheManager.lua
local MAX_CACHE_SIZE = 10000 -- Maximum cached items
local DEFAULT_TTL = 300 -- Default expiration (5 minutes)

Networking Configuration ​

lua
-- In mods/NetworkingModule.lua
local MAX_RETRIES = 3
local RETRY_DELAY = 2 -- seconds
local REQUEST_TIMEOUT = 10 -- seconds
local RATE_LIMIT_WINDOW = 60 -- seconds
local MAX_REQUESTS_PER_WINDOW = 100

Performance Tips ​

  1. Use TTL on temporary data - Prevent memory leaks by setting expiration times
  2. Use pattern matching carefully - Keys() can be slow with many keys
  3. Batch operations when possible - Reduces overhead
  4. Use appropriate data structures - Sorted Sets for leaderboards, Lists for queues, etc.

Troubleshooting ​

"Key not found" ​

Make sure you're checking if the key exists before getting it, or the TTL hasn't expired.

lua
if Raddish.Exists("mykey") then
    local value = Raddish.Get("mykey")
end

"Cache full" ​

Increase MAX_CACHE_SIZE or implement better cleanup strategies with TTL.

Rate limit errors ​

The system handles this automatically, but you can check stats:

lua
local stats = Raddish.GetStats()
print("Cache size:", stats.size)
print("Max size:", stats.maxSize)

"Beyond Boundaries. Beyond Imagination."