当前位置: 首页>>代码示例>>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;未经允许,请勿转载。