當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GeneralCache::forgetAll方法代碼示例

本文整理匯總了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();
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:7,代碼來源:RightsCache.php

示例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
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:12,代碼來源:ForgetAllCacheUtil.php

示例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();
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:13,代碼來源:BaseTest.php

示例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();
 }
開發者ID:RamaKavanan,項目名稱:BaseVersion,代碼行數:41,代碼來源:CustomextInstallUtil.php

示例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();
 }
開發者ID:sandeep1027,項目名稱:zurmo_,代碼行數:23,代碼來源:ZurmoZooInstallUtil.php

示例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);
     }
 }
開發者ID:sandeep1027,項目名稱:zurmo_,代碼行數:23,代碼來源:GeneralCacheTest.php

示例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;
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:23,代碼來源:LanguageController.php

示例8: forgetAll

 public static function forgetAll()
 {
     GeneralCache::forgetAll();
 }
開發者ID:sandeep1027,項目名稱:zurmo_,代碼行數:4,代碼來源:PoliciesCache.php

示例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();
 }
開發者ID:RamaKavanan,項目名稱:InitialVersion,代碼行數:29,代碼來源:DefaultController.php

示例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();
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:15,代碼來源:BaseTest.php

示例11: tearDown

 public function tearDown()
 {
     GeneralCache::forgetAll();
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:4,代碼來源:GeneralCacheTest.php

示例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);
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:10,代碼來源:DefaultController.php


注:本文中的GeneralCache::forgetAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。