Table of Contents

generateId

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Cache Class JCache Method generateId Reference generateId() Never Work in Progress

Make a control key with the string containing data.

Syntax

string generateId ( $data, $controlType )

$data string is a string from which to create the control key.
$controlType string is a string containing the type of control. This can be ‘md5’, ‘crc32’ or ‘strlen’. This parameter is optional and if omitted defaults to ‘md5’.

Examples

Example

$cache =& JFactory::getCache();

echo "Control key of JClass: " . $cache->generateId( 'JClass', 'crc32' );

might produce:

Result

Control key of JClass:  -173455057