Rediska

Follow me on twitter…

Basic

Exists

<?php

/**
 * Test if a key exists
 * 
 * @param string $name Key name
 * @return boolean
 */

?>

Delete

<?php

/**
 * Delete a key or keys
 * 
 * @param string|array Key name or array of key names
 * @return integer
 */

?>

GetType

<?php

/**
 * Get key type
 * 
 * @param string $name Key name
 * @return string
 */

?>

GetKeysByPattern

<?php

/**
 * Returns all the keys matching the glob-style pattern
 * Glob style patterns examples:
 *   h?llo will match hello hallo hhllo
 *   h*llo will match hllo heeeello
 *   h[ae]llo will match hello and hallo, but not hillo
 * 
 * @throws Rediska_Command_Exception
 * @param string $pattern
 * @return array
 */

?>

GetRandomKey

<?php

/**
 * Return a random key from the key space
 * 
 * @return null|string
 */

?>

Rename

<?php

/**
 * Rename the old key in the new one
 * 
 * @throws Rediska_Command_Exception
 * @param string $oldName Old key name
 * @param string $newName New key name
 * @param boolean $overwrite Overwrite the new name key if it already exists 
 * @return boolean
 */

?>

GetKeysCount

<?php

/**
 * Get the number of keys
 * 
 * @return integer
 */

?>

Expire

<?php

/**
 * Set a time to live in seconds or timestamp on a key
 * 
 * @throws Rediska_Command_Exception
 * @param string  $name               Key name
 * @param integer $secondsOrTimestamp Time in seconds or timestamp
 * @param boolean $isTimestamp        Time is timestamp. For default is false.
 * @return boolean
 */

?>

GetLifetime

<?php

/**
 * Get key lifetime
 * 
 * @param string $name
 * @return integer
 */

?>

SelectDb

<?php

/**
 * Select the DB having the specified index
 * 
 * @throws Rediska_Command_Exception
 * @param integer $index Db index
 * @return boolean
 */

?>

MoveToDb

<?php

/**
 * Move the key from the currently selected DB to the DB having as index dbindex
 * 
 * @throws Rediska_Command_Exception
 * @param string  $name  Key name
 * @param integer $index Db index
 * @return boolean
 */

?>

FlushDb

<?php

/**
 * Remove all the keys of the currently selected DB
 * 
 * @param boolean $all Remove from all Db
 * @return boolean
 */

?>

Comments