本文整理汇总了PHP中GeneralCache::forgetAll方法的典型用法代码示例。如果您正苦于以下问题:PHP GeneralCache::forgetAll方法的具体用法?PHP GeneralCache::forgetAll怎么用?PHP GeneralCache::forgetAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeneralCache
的用法示例。
在下文中一共展示了GeneralCache::forgetAll方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: forgetAll
public static function forgetAll($forgetDbLevelCache = true)
{
if (static::supportsAndAllowsDatabaseCaching() && $forgetDbLevelCache) {
ZurmoDatabaseCompatibilityUtil::callProcedureWithoutOuts("clear_cache_actual_rights()");
}
parent::forgetAll();
}
示例2: forgetAllCaches
public static function forgetAllCaches()
{
RedBeanModelsCache::forgetAll();
RedBeansCache::forgetAll();
PermissionsCache::forgetAll();
RightsCache::forgetAll();
PoliciesCache::forgetAll();
GeneralCache::forgetAll();
BeanModelCache::forgetAll();
Currency::resetCaches();
//php only cache
}
示例3: tearDownAfterClass
public static function tearDownAfterClass()
{
if (RedBeanDatabase::isFrozen()) {
TestDatabaseUtil::deleteRowsFromAllTablesExceptLog();
} else {
TestDatabaseUtil::deleteAllTablesExceptLog();
}
RedBeanModel::forgetAll();
RedBeanDatabase::close();
assert('!RedBeanDatabase::isSetup()');
// Not Coding Standard
GeneralCache::forgetAll();
}
示例4: resolveCustomMetadataAndLoad
public static function resolveCustomMetadataAndLoad()
{
$shouldSaveZurmoModuleMetadata = false;
$metadata = ZurmoModule::getMetadata();
//Add Material to Menu if it doesn't exist
if (!in_array('costbook', $metadata['global']['tabMenuItemsModuleOrdering'])) {
$metadata['global']['tabMenuItemsModuleOrdering'][] = 'costbook';
$shouldSaveZurmoModuleMetadata = true;
}
if (!in_array('departmentReferences', $metadata['global']['tabMenuItemsModuleOrdering'])) {
$metadata['global']['tabMenuItemsModuleOrdering'][] = 'departmentReferences';
$shouldSaveZurmoModuleMetadata = true;
}
if (!in_array('agreements', $metadata['global']['tabMenuItemsModuleOrdering'])) {
$metadata['global']['tabMenuItemsModuleOrdering'][] = 'agreements';
$shouldSaveZurmoModuleMetadata = true;
}
if (!in_array('agreementProducts', $metadata['global']['tabMenuItemsModuleOrdering'])) {
$metadata['global']['tabMenuItemsModuleOrdering'][] = 'agreementProducts';
$shouldSaveZurmoModuleMetadata = true;
}
if (!in_array('opportunityProducts', $metadata['global']['tabMenuItemsModuleOrdering'])) {
$metadata['global']['tabMenuItemsModuleOrdering'][] = 'opportunityProducts';
$shouldSaveZurmoModuleMetadata = true;
}
if (!in_array('categories', $metadata['global']['tabMenuItemsModuleOrdering'])) {
$metadata['global']['tabMenuItemsModuleOrdering'][] = 'categories';
$shouldSaveZurmoModuleMetadata = true;
}
if ($shouldSaveZurmoModuleMetadata) {
ZurmoModule::setMetadata($metadata);
GeneralCache::forgetAll();
}
Yii::import('application.extensions.zurmoinc.framework.data.*');
$defaultDataMaker = new AgreementsDefaultDataMaker();
$defaultDataMaker->make();
$defaultDataMaker = new CostbooksDefaultDataMaker();
$defaultDataMaker->make();
$defaultDataMaker = new OpportunitiesDefaultDataMaker();
$defaultDataMaker->make();
}
示例5: resolveCustomMetadataAndLoad
public static function resolveCustomMetadataAndLoad()
{
$shouldSaveZurmoModuleMetadata = false;
$metadata = ZurmoModule::getMetadata();
if (!in_array('animals', $metadata['global']['tabMenuItemsModuleOrdering'])) {
$metadata['global']['tabMenuItemsModuleOrdering'][] = 'animals';
$shouldSaveZurmoModuleMetadata = true;
}
if ($shouldSaveZurmoModuleMetadata) {
ZurmoModule::setMetadata($metadata);
GeneralCache::forgetAll();
}
$metadata = Activity::getMetadata();
if (!in_array('Animal', $metadata['Activity']['activityItemsModelClassNames'])) {
$metadata['Activity']['activityItemsModelClassNames'][] = 'Animal';
Activity::setMetadata($metadata);
GeneralCache::forgetAll();
}
Yii::import('application.extensions.zurmoinc.framework.data.*');
Yii::import('application.modules.animals.data.*');
$defaultDataMaker = new AnimalsDefaultDataMaker();
$defaultDataMaker->make();
}
示例6: testForgetAllNotDeleteOtherDataFromCache
public function testForgetAllNotDeleteOtherDataFromCache()
{
if (MEMCACHE_ON && !PHP_CACHING_ON) {
GeneralCache::cacheEntry('somethingForTesting4', 34);
$value = GeneralCache::getEntry('somethingForTesting4');
$this->assertEquals(34, $value);
$originalAdditionalStringForCachePrefix = GeneralCache::getAdditionalStringForCachePrefix();
GeneralCache::setAdditionalStringForCachePrefix('ATEST');
GeneralCache::cacheEntry('somethingForTesting4', 43);
$value = GeneralCache::getEntry('somethingForTesting4');
$this->assertEquals(43, $value);
GeneralCache::forgetAll();
try {
GeneralCache::getEntry('somethingForTesting4');
$this->fail('NotFoundException exception is not thrown.');
} catch (NotFoundException $e) {
$this->assertTrue(true);
}
GeneralCache::setAdditionalStringForCachePrefix($originalAdditionalStringForCachePrefix);
$value = GeneralCache::getEntry('somethingForTesting4');
$this->assertEquals(34, $value);
}
}
示例7: actionDeactivate
public function actionDeactivate($languageCode)
{
$languageData = LanguagesCollectionView::getLanguageDataByLanguageCode($languageCode);
try {
if (Yii::app()->languageHelper->deactivateLanguage($languageCode)) {
$message = Zurmo::t('ZurmoModule', '{languageName} deactivated successfully', array('{languageName}' => $languageData['label']));
$content = LanguagesCollectionView::renderFlashMessage($message);
RedBeansCache::forgetAll();
GeneralCache::forgetAll();
}
} catch (Exception $e) {
$exceptionMessage = $e->getMessage();
if (!empty($exceptionMessage)) {
$message = Zurmo::t('ZurmoModule', '{languageName} deactivate failed. Error: {errorMessage}', array('{languageName}' => $languageData['label'], '{errorMessage}' => $exceptionMessage));
} else {
$message = Zurmo::t('ZurmoModule', '{languageName} deactivate failed. Unexpected error.', array('{languageName}' => $languageData['label']));
}
$content = LanguagesCollectionView::renderFlashMessage($message, true);
}
$view = new LanguagesCollectionView($this->getId(), $this->getModule()->getId());
$content .= $view->renderLanguageRow($languageCode);
echo $content;
}
示例8: forgetAll
public static function forgetAll()
{
GeneralCache::forgetAll();
}
示例9: actionEditDashboard
/**
* Only supports saving 4 layoutTypes (max 2 column)
*
*/
public function actionEditDashboard($id)
{
$id = intval($id);
$dashboard = Dashboard::getById(intval($id));
ControllerSecurityUtil::resolveAccessCanCurrentUserWriteModel($dashboard);
if (isset($_POST['Dashboard'])) {
$oldLayoutType = $dashboard->layoutType;
$_POST['Dashboard'] = PostUtil::sanitizePostByDesignerTypeForSavingModel($dashboard, $_POST['Dashboard']);
$dashboard->setAttributes($_POST['Dashboard']);
assert('in_array($dashboard->layoutType, array_keys(Dashboard::getLayoutTypesData()))');
if ($dashboard->save()) {
if ($oldLayoutType != $dashboard->layoutType && $dashboard->layoutType == '100') {
$uniqueLayoutId = 'HomeDashboard' . $dashboard->layoutId;
$portletCollection = Portlet::getByLayoutIdAndUserSortedByColumnIdAndPosition($uniqueLayoutId, Yii::app()->user->userModel->id, array());
Portlet::shiftPositionsBasedOnColumnReduction($portletCollection, 1);
}
GeneralCache::forgetAll();
//Ensure menu refreshes
$this->redirect(array('default/dashboardDetails', 'id' => $dashboard->id));
}
}
$editView = new DashboardEditView($this->getId(), $this->getModule()->getId(), $dashboard, strval($dashboard));
$view = new AccountsPageView(ZurmoDefaultViewUtil::makeStandardViewForCurrentUser($this, $editView));
echo $view->render();
}
示例10: tearDownAfterClass
public static function tearDownAfterClass()
{
if (static::$activateDefaultLanguages) {
Yii::app()->languageHelper->deactivateLanguagesForTesting();
}
TestDatabaseUtil::deleteRowsFromAllTablesExceptLog();
PermissionsCache::forgetAll();
AllPermissionsOptimizationCache::forgetAll();
RedBeanModel::forgetAll();
RedBeanDatabase::close();
assert('!RedBeanDatabase::isSetup()');
// Not Coding Standard
GeneralCache::forgetAll();
BeanModelCache::forgetAll();
}
示例11: tearDown
public function tearDown()
{
GeneralCache::forgetAll();
}
示例12: actionModuleSave
protected function actionModuleSave($moduleForm, $module)
{
$moduleForm->setAttributes($_POST[get_class($moduleForm)]);
$adapter = new ModuleFormToMetadataAdapter($module, $moduleForm);
$adapter->setMetadata();
Yii::app()->languageHelper->flushModuleLabelTranslationParameters();
GeneralCache::forgetAll();
$routeParams = array_merge(array('default/modulesMenu'), $_GET, array('moduleClassName' => get_class($module)));
$this->redirect($routeParams);
}