Quote:
Originally Posted by ps2wiz
Any chance wincache support can be added for the 3.8 version?
|
The 3.8 version is discontinued unfortunately, due to issues and as such some elements being cached in the vB4 version don't exist in vB 3.8 (atleast within Pro, which may trickle down to lite).
That said, adding the WinCache support is relatively easy, you'll need to do two things. Firstly, open ./includes/class_activecache_methods.php, then add this lump of code right above the last "?>"
PHP Code:
class vb_activecache_wincache extends vb_activecache
{
static $class = __CLASS__;
static $instance;
function get_instance()
{
return (self::$instance) ? self::$instance : (self::$instance =& new self::$class());
}
function suicide()
{
if (self::$instance)
{
self::$instance = null;
}
parent::suicide();
}
function connect()
{
if (!function_exists('wincache_ucache_get'))
{
return false;
}
return true;
}
function set_title(&$title)
{
$title = $this->prefix . $title;
}
function fetch($title)
{
if (!$this->connect())
{
return false;
}
$this->set_title($title);
return $this->integrity_check(wincache_ucache_get($title));
}
function set($title, $item)
{
if (!$this->connect())
{
return false;
}
$this->set_title($title);
if (trim($item) == '')
{
$item = '{_______VB_ACTIVE_CACHE_BLANK_______}';
}
wincache_ucache_set($title, $item);
}
function flush()
{
wincache_ucache_clear();
}
}
Secondly you'd need to add the option for WinCache in the options, you can do this one of two ways. If you have debug mode enabled, you can simply edit the option within the ACP. Or if you want, you can edit the product XML and find the following:
Code:
memcache|Memcache
xcache|XCache
apc|APC
Simply change to:
Code:
memcache|Memcache
xcache|XCache
apc|APC
wincache|WinCache
Then re-import the product XML, you should get the option and it should work, although I haven't tested it