Mc.php
410 Bytes
<?php
/**
*
* @author tongdesheng
*
*/
class YHMUtils_Mc {
/**
* 缓存对象
* @return Q_Cache_Adapter_Interface
*/
public static function getMc($domain = 'www', $class = 'www')
{
if (Q_Version::VERSION == 'QF.1.0') {
return Q_Cache::factory('Memcached')->setPrefix($domain . '.' . $class);
}
return Q_Cache::factory(array(
'domain' => $domain,
'class' => $class
));
}
}