本文整理匯總了PHP中vmPlugin::setCache方法的典型用法代碼示例。如果您正苦於以下問題:PHP vmPlugin::setCache方法的具體用法?PHP vmPlugin::setCache怎麽用?PHP vmPlugin::setCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vmPlugin
的用法示例。
在下文中一共展示了vmPlugin::setCache方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getPluginInternalData
/**
* This loads the data stored by the plugin before, NOT the configuration of the method,
* this function should never be triggered only called from triggered functions.
*
* @param int $id
* @param string $primaryKey
*/
protected function getPluginInternalData($id, $primaryKey = 0)
{
$x = vmPlugin::getCache('getPluginInternalData', $this->_vmpItable, $id, $this->_tablename, $this->tableFields, $primaryKey, $this->_tableId, $this->_loggable);
if (!empty($x)) {
//OPCloader::opcDebug('cache is_active:');
//OPCloader::opcDebug($x->is_active);
return $x;
}
if (isset($this->_vmpItable)) {
$vmpItableStored = $this->_vmpItable;
} else {
$vmpItableStored = null;
}
if ($primaryKey === 0) {
$primaryKey = $this->_tablepkey;
}
$this->_vmpItable = $this->createPluginTableObject($this->_tablename, $this->tableFields, $primaryKey, $this->_tableId, $this->_loggable);
// vmdebug('getPluginInternalData $id '.$id.' and $primaryKey '.$primaryKey);
//$ret = $this->_vmpItable->clear();
$ret = $this->_vmpItable->load($id);
vmPlugin::setCache($ret, 'getPluginInternalData', $vmpItableStored, $id, $this->_tablename, $this->tableFields, $primaryKey, $this->_tableId, $this->_loggable);
//OPCloader::opcDebug($vmpItableStored);
//OPCloader::opcDebug('is_active:');
//OPCloader::opcDebug($ret);
return $ret;
}