Rediska

Follow me on twitter…

Redis config

Redis server can be configured during runtime:

<?php

// Initialize Rediska
$rediska = new Rediska();

// Get Redis config
$config = $rediska->config();

// Get parameter
print $config->maxmemory;

// Parameters accessable as array keys
print $config['maxmemory'];

// Set parameter
$config->maxmemory = 10000;

// Get parameters by pattern
foreach($config['max*'] as $name => $value) {
    print "$name => $value\n";
}

// Iterate all redis parameters
foreach($config as $name => $value) {
    print "$name => $value\n";
}

?>

Comments

Fork me on GitHub