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


PHP CacheManager::load方法代碼示例

本文整理匯總了PHP中CacheManager::load方法的典型用法代碼示例。如果您正苦於以下問題:PHP CacheManager::load方法的具體用法?PHP CacheManager::load怎麽用?PHP CacheManager::load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CacheManager的用法示例。


在下文中一共展示了CacheManager::load方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: createReaction

 private function createReaction($id)
 {
     $key = "ReactionObject-{$id}";
     if ($this->cacheMgr->isCached($key)) {
         return $this->cacheMgr->load($key);
     } else {
         $object = new Reaction($id);
         $this->cacheMgr->save($key, $object, 3600);
         return $object;
     }
 }
開發者ID:Covert-Inferno,項目名稱:reaction-toolkit,代碼行數:11,代碼來源:ObjectFactory.php

示例2: getAllSystems

 /**
  * Returns all columns of all rows from the systems table as an associative array keyed by systemID.
  * @param	none
  * @return	array
  */
 public function getAllSystems()
 {
     $key = __METHOD__ . "(" . implode(",", func_get_args()) . ")";
     if ($this->cacheMgr->isCached($key)) {
         $systems = $this->cacheMgr->load($key);
     } else {
         $sql = "SELECT systemID, systemName FROM {$this->dbPrefix}systems ORDER BY systemID ASC;";
         $query = $this->pdo->prepare($sql);
         $query->execute();
         if ($systems = $query->fetchAll(PDO::FETCH_KEY_PAIR)) {
             if (count($systems) > 0) {
                 $this->cacheMgr->save($key, $systems, 86400);
             }
         }
         $query->closeCursor();
         $query = null;
     }
     return $systems;
 }
開發者ID:Covert-Inferno,項目名稱:reaction-toolkit,代碼行數:24,代碼來源:DatabaseManager.php

示例3: load

 /**
  * Loads and returns the pages categories cached data.
  * @return PagesCategoriesCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'pages', 'categories');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:PagesCategoriesCache.class.php

示例4: load

 /**
  * Loads and returns the menus cached data.
  * @return MenusCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'kernel', 'menus');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:MenusCache.class.php

示例5: load

 /**
  * Loads and returns the extended_fields cached data.
  * @return ExtendedFieldsCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'kernel', 'extended-fields');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:ExtendedFieldsCache.class.php

示例6: load

 /**
  * Loads and returns the bugtracker stats cached data.
  * @return BugtrackerStatsCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'bugtracker', 'stats');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:BugtrackerStatsCache.class.php

示例7: load

 /**
  * Loads and returns the administrator alert cached data.
  * @return AdministratorAlertCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'kernel', 'administrator-alert');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:AdministratorAlertCache.class.php

示例8: load

 /**
  * Loads and returns the poll cached data.
  * @return PollMiniMenuCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'poll', 'minimenu');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:PollMiniMenuCache.class.php

示例9: load

 /**
  * Loads and returns the unread contribution cached data.
  * @return UnreadContributionsCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'kernel', 'unread-contributions');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:UnreadContributionsCache.class.php

示例10: load

 /**
  * Loads and returns the faq cached data.
  * @return FaqCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'module', 'faq');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:FaqCache.class.php

示例11: load

 /**
  * Loads and returns the groups cached data.
  * @return HtaccessFileCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'kernel', 'htaccess-file');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:HtaccessFileCache.class.php

示例12: load

 /**
  * Loads and returns the messages guestbook cached data.
  * @return GuestbookMessagesCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'guestbook', 'messages');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:GuestbookMessagesCache.class.php

示例13: load

 /**
  * Loads and returns the ranks cached data.
  * @return ForumRanksCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'forum', 'ranks');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:ForumRanksCache.class.php

示例14: load

 /**
  * Loads and returns current month events cached data.
  * @return CalendarCurrentMonthEventsCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(__CLASS__, 'calendar', 'currentmonthevents');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:CalendarCurrentMonthEventsCache.class.php

示例15: load

 /**
  * Loads and returns the categories cached data.
  * @return CategoriesCache The cached data
  */
 public static function load()
 {
     return CacheManager::load(get_called_class(), self::get_class()->get_module_identifier(), 'categories');
 }
開發者ID:AroundPBT,項目名稱:PHPBoost,代碼行數:8,代碼來源:CategoriesCache.class.php


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