Redix LogoDocumentation
API ReferenceUtilities

Overview

Utility operations provide system-level functionality for Redis management, health monitoring, custom command execution, and direct access to the Redis instance. These operations are useful for administration, debugging, and advanced use cases.

Available Operations

Connection

  • Ping - Test the connection
  • Test - Run complete test suite

Information

  • Info - Get server information and statistics

Database

  • FlushDB - Delete all keys in current database

Advanced

Use Cases

  • Health monitoring
  • Statistics collection
  • Custom commands execution
  • Development and debugging
  • Administration tasks

Quick Example

local Redix = exports.redix:GetInterface()

-- Health check
Redix.Ping(function(err, response)
    if response == 'PONG' then
        print('Redis is healthy')
    end
end)

-- Get server info
Redix.Info('stats', function(err, stats)
    print('Redis stats:', stats)
end)

Some operations like FlushDB are destructive. Use with caution, especially in production.