Source for file wincache.php
Documentation is available at wincache.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* WINCACHE cache storage handler
* @package Joomla.Platform
* @see http://php.net/manual/en/book.wincache.php
* @param array $options Optional parameters.
* Get cached data from WINCACHE by id and group
* @param string $id The cache data id
* @param string $group The cache data group
* @param boolean $checkTime True to verify cache time expiration threshold
* @return mixed Boolean false on failure or a cached data string
public function get($id, $group, $checkTime =
true)
$cache_content =
wincache_ucache_get($cache_id);
$allinfo =
wincache_ucache_info();
$keys =
$allinfo['cache_entries'];
$name =
$key['key_name'];
if ($namearr !==
false &&
$namearr[0] ==
$secret &&
$namearr[1] ==
'cache')
if (!isset
($data[$group]))
if (isset
($key['value_size']))
$item->updateSize($key['value_size'] /
1024);
// Dummy, WINCACHE version is too low.
* Store the data to WINCACHE by id and group
* @param string $id The cache data id
* @param string $group The cache data group
* @param string $data The data to store in cache
* @return boolean True on success, false otherwise
public function store($id, $group, $data)
return wincache_ucache_set($cache_id, $data, $this->_lifetime);
* Remove a cached data entry by id and group
* @param string $id The cache data id
* @param string $group The cache data group
* @return boolean True on success, false otherwise
public function remove($id, $group)
return wincache_ucache_delete($cache_id);
* Clean cache for a group given a mode.
* @param string $group The cache data group
* @param string $mode The mode for cleaning cache [group|notgroup]
* group mode : cleans all cache in the group
* notgroup mode : cleans all cache not in the group
* @return boolean True on success, false otherwise
public function clean($group, $mode =
null)
$allinfo =
wincache_ucache_info();
$keys =
$allinfo['cache_entries'];
if (strpos($key['key_name'], $secret .
'-cache-' .
$group .
'-') ===
0 xor $mode !=
'group')
wincache_ucache_delete($key['key_name']);
* Force garbage collect expired cache data as items are removed only on get/add/delete/info etc
* @return boolean True on success, false otherwise.
$allinfo =
wincache_ucache_info();
$keys =
$allinfo['cache_entries'];
if (strpos($key['key_name'], $secret .
'-cache-'))
wincache_ucache_get($key['key_name']);
* Test to see if the cache storage is available.
* @return boolean True on success, false otherwise.
Documentation generated on Tue, 19 Nov 2013 15:18:35 +0100 by phpDocumentor 1.4.3