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


PHP XenForo_Application::setSimpleCacheData方法代碼示例

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


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

示例1: _set

 protected function _set($users, $time = null)
 {
     if ($time == NULL) {
         $time = XenForo_Application::$time;
     }
     XenForo_Application::setSimpleCacheData(self::CACHE_KEY, array($time, $users));
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:7,代碼來源:OnlineUsers.php

示例2: verifyOption

 public static function verifyOption(array &$values, XenForo_DataWriter $dw, $fieldName)
 {
     if (!$values) {
         XenForo_Application::setSimpleCacheData('xengalleryStatisticsCache', false);
     }
     return true;
 }
開發者ID:VoDongMy,項目名稱:xenforo-laravel5.1,代碼行數:7,代碼來源:StatisticsBlock.php

示例3: runCron

 public static function runCron()
 {
     $Model = XenForo_Model::create('Turki_Adv_Model_View');
     $Advs = $Model->getAllAdvHooks();
     $adv_xenforo = array("AdvsHook" => $Advs);
     XenForo_Application::setSimpleCacheData('adv_xenforo', $adv_xenforo);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:7,代碼來源:Cache.php

示例4: verifyOption

 public static function verifyOption(&$value, XenForo_DataWriter $dw, $fieldName)
 {
     XenForo_Application::setSimpleCacheData('taigachat_lastUpdate', XenForo_Application::$time);
     /** @var Dark_TaigaChat_Model_TaigaChat */
     $taigaModel = XenForo_Model::create("Dark_TaigaChat_Model_TaigaChat");
     $taigaModel->regeneratePublicHtml($value);
     return true;
 }
開發者ID:VoDongMy,項目名稱:xenforo-laravel5.1,代碼行數:8,代碼來源:Motd.php

示例5: removeCopyrightNotice

 /**
  *
  * @param array $matches
  * @return string
  */
 public static function removeCopyrightNotice(array $matches)
 {
     $copyrightModification = XenForo_Application::getSimpleCacheData(parent::COPYRIGHT_MODIFICATION_SIMPLE_CACHE_KEY);
     if ($copyrightModification < XenForo_Application::$time) {
         XenForo_Application::setSimpleCacheData(parent::COPYRIGHT_MODIFICATION_SIMPLE_CACHE_KEY, XenForo_Application::$time);
     }
     return $matches[0];
 }
開發者ID:ThemeHouse-XF,項目名稱:BrandingRemove,代碼行數:13,代碼來源:InitDependencies.php

示例6: getAllCachedCollections

 public function getAllCachedCollections()
 {
     $collections = XenForo_Application::getSimpleCacheData(self::$allCacheKey);
     if (!$collections) {
         $collections = $this->getCollections();
         XenForo_Application::setSimpleCacheData(self::$allCacheKey, $collections);
     }
     return $collections;
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:9,代碼來源:Collection.php

示例7: getAllCachedFields

 public function getAllCachedFields()
 {
     $fields = XenForo_Application::getSimpleCacheData(self::$allCacheKey);
     if (!$fields) {
         $fields = $this->getFields();
         XenForo_Application::setSimpleCacheData(self::$allCacheKey, $fields);
     }
     return $fields;
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:9,代碼來源:Field.php

示例8: rebuildUserBannerGroupCache

 public function rebuildUserBannerGroupCache()
 {
     $userBannerGroups = $this->getUserBannerGroups();
     if ($userBannerGroups) {
         XenForo_Application::setSimpleCacheData('th_userBannerGroups', $userBannerGroups);
     } elseif (XenForo_Application::getSimpleCacheData('th_userBannerGroups')) {
         XenForo_Application::setSimpleCacheData('th_userBannerGroups', false);
     }
     return $userBannerGroups;
 }
開發者ID:ThemeHouse-XF,項目名稱:UserBannerGrp,代碼行數:10,代碼來源:UserBannerGroup.php

示例9: uninstall

 public static function uninstall()
 {
     $db = XenForo_Application::get('db');
     $db->query("DROP TABLE IF EXISTS bbm");
     $db->query("DROP TABLE IF EXISTS bbm_buttons");
     if ($db->fetchRow('SHOW COLUMNS FROM xf_forum WHERE Field = ?', 'bbm_bm_editor')) {
         $db->query("ALTER TABLE xf_forum DROP bbm_bm_editor");
     }
     XenForo_Model::create('XenForo_Model_DataRegistry')->delete('bbm_buttons');
     XenForo_Application::setSimpleCacheData('bbm_active', false);
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:11,代碼來源:Installer.php

示例10: getAllNodes

 public function getAllNodes()
 {
     if ($this->_nodes === null) {
         $nodes = XenForo_Application::getSimpleCacheData(self::$nodesCacheKey);
         if ($nodes === false) {
             $nodes = $this->_getNodeModel()->getAllNodes();
             XenForo_Application::setSimpleCacheData(self::$nodesCacheKey, $nodes);
         }
         $this->_nodes = $nodes;
     }
     return $this->_nodes;
 }
開發者ID:darkearl,項目名稱:projectT122015,代碼行數:12,代碼來源:Log.php

示例11: saveGroupPermDataCache

 public function saveGroupPermDataCache()
 {
     $groups = $this->getGroups();
     foreach ($groups as &$group) {
         if (!is_array($group['permissions'])) {
             $group['permissions'] = @unserialize($group['permissions']);
         }
     }
     if (!defined('TEAM_DATAREGISTRY_KEY')) {
         define('TEAM_DATAREGISTRY_KEY', 'Teams_group_perms');
     }
     XenForo_Application::setSimpleCacheData(TEAM_DATAREGISTRY_KEY, $groups);
     return $groups;
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:14,代碼來源:MemberGroup.php

示例12: runStatisticsUpdate

 /**
  * Updates statistics for XenForo Media Gallery.
  */
 public static function runStatisticsUpdate()
 {
     /** @var  $categoryModel XenGallery_Model_Category */
     $categoryModel = XenForo_Model::create('XenGallery_Model_Category');
     /** @var  $albumModel XenGallery_Model_Album */
     $albumModel = XenForo_Model::create('XenGallery_Model_Album');
     /** @var  $mediaModel XenGallery_Model_Media */
     $mediaModel = XenForo_Model::create('XenGallery_Model_Media');
     /** @var  $commentModel XenGallery_Model_Comment */
     $commentModel = XenForo_Model::create('XenGallery_Model_Comment');
     $statisticsCache = array('category_count' => $categoryModel->getCategoryCount(), 'album_count' => $albumModel->countAlbums(), 'upload_count' => $mediaModel->countMedia(array('media_type' => array('image_upload', 'video_upload')), array('join' => XenGallery_Model_Media::FETCH_ALBUM)), 'embed_count' => $mediaModel->countMedia(array('media_type' => 'video_embed'), array('join' => XenGallery_Model_Media::FETCH_ALBUM)), 'comment_count' => $commentModel->countComments(), 'disk_usage' => $mediaModel->calculateMediaDiskUsage());
     XenForo_Application::setSimpleCacheData('xengalleryStatisticsCache', $statisticsCache);
     return true;
 }
開發者ID:VoDongMy,項目名稱:xenforo-laravel5.1,代碼行數:17,代碼來源:Statistics.php

示例13: rebuildChildNodesCache

 public static function rebuildChildNodesCache()
 {
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $nodeId = WidgetFramework_Option::get('indexNodeId');
     $childNodes = array();
     if ($nodeId > 0) {
         $widgetPage = $nodeModel->getNodeById($nodeId);
         if (!empty($widgetPage)) {
             $childNodes = $nodeModel->getChildNodes($widgetPage, true);
             XenForo_Application::setSimpleCacheData(self::SIMPLE_CACHE_CHILD_NODES, $childNodes);
         }
     }
     return $childNodes;
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:14,代碼來源:Index.php

示例14: getShortUrlLengthHttps

 public function getShortUrlLengthHttps($token)
 {
     $data = XenForo_Application::getSimpleCacheData(self::SIMPLE_CACHE_DATA_KEY_SHORT_URL_LENGTH_HTTPS);
     if (empty($data) or XenForo_Application::$time - $data['timestamp'] > 86400) {
         $response = bdSocialShare_Helper_Twitter::helpConfiguration($token['oauth_token'], $token['oauth_token_secret']);
         if (!empty($response['short_url_length_https'])) {
             $data = array('value' => $response['short_url_length_https'], 'timestamp' => time());
             XenForo_Application::setSimpleCacheData(self::SIMPLE_CACHE_DATA_KEY_SHORT_URL_LENGTH_HTTPS, $data);
         } else {
             // for some reason we cannot get configuration from Twitter,
             // return our best guess then: as of September 13, 2014 it is 23
             return 30;
         }
     }
     return $data['value'];
 }
開發者ID:Sywooch,項目名稱:forums,代碼行數:16,代碼來源:Twitter.php

示例15: getInstances

 public static function getInstances()
 {
     if (!self::$_instance) {
         /* @var $self sonnbUpThread_Model_Up*/
         $self = self::create('sonnbUpThread_Model_Up');
         if (!$self->_nodes) {
             $nodes = XenForo_Application::getSimpleCacheData($self->_nodesCacheKey);
             if ($nodes === false) {
                 $nodes = $self->_getNodeModel()->getAllNodes();
                 XenForo_Application::setSimpleCacheData($self->_nodesCacheKey, $nodes);
             }
             $self->_nodes = $nodes;
         }
         self::$_instance = $self;
     }
     return self::$_instance;
 }
開發者ID:darkearl,項目名稱:projectT122015,代碼行數:17,代碼來源:Up.php


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