Back to Cache class

Method get

public mixed
get
(mixed $id, mixed $group = null)
Get cached data by ID and group
Parameters
  • string $id The cache data ID
  • string $group The cache data group
Returns
  • mixed Boolean false on failure or a cached data object
Since
  • 1.7.0
Class: Cache
Project: Joomla

Method get - Source code

/**
 * Get cached data by ID and group
 *
 * @param   string  $id     The cache data ID
 * @param   string  $group  The cache data group
 *
 * @return  mixed  Boolean false on failure or a cached data object
 *
 * @since   1.7.0
 */
public function get($id, $group = null)
{
    if (!$this->getCaching()) {
        return false;
    }
    // Get the default group
    $group = $group ?: $this->_options['defaultgroup'];
    return $this->_getStorage()->get($id, $group, $this->_options['checkTime']);
}