当前位置: 首页>>代码示例>>PHP>>正文


PHP CacheManager::CachingAvailable方法代码示例

本文整理汇总了PHP中CacheManager::CachingAvailable方法的典型用法代码示例。如果您正苦于以下问题:PHP CacheManager::CachingAvailable方法的具体用法?PHP CacheManager::CachingAvailable怎么用?PHP CacheManager::CachingAvailable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CacheManager的用法示例。


在下文中一共展示了CacheManager::CachingAvailable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initDataProvider

function initDataProvider($connection = false)
{
    global $CONFIG, $DB_CONNECTOR, $CM;
    if (!empty($CONFIG["gl_datprov"])) {
        if (!defined("DB_PREFIX")) {
            define("DB_PREFIX", $CONFIG["gl_db_prefix"]);
        }
        $DB_CONNECTOR = new DBManager($CONFIG["gl_db_user"], $CONFIG["gl_db_pass"], $CONFIG["gl_db_host"], $CONFIG["gl_db_name"], $CONFIG["gl_db_prefix"]);
        if (!empty($CONFIG["gl_db_ext"])) {
            DBManager::$Extension = $CONFIG["gl_db_ext"];
        }
        if ($DB_CONNECTOR->InitConnection()) {
            $connection = true;
        }
    }
    if (!defined("DB_CONNECTION")) {
        define("DB_CONNECTION", $connection);
    }
    if ($connection) {
        loadDatabaseConfig(false, $CONFIG["gl_db_prefix"]);
        if (!isset($CONFIG["gl_caen"])) {
            $CONFIG["gl_caen"] = 1;
        }
        if (!isServerSetup() && !is("IN_API") && CacheManager::CachingAvailable($CONFIG["gl_caen"]) !== false) {
            $gttl = min($CONFIG["poll_frequency_clients"], $CONFIG["poll_frequency_tracking"]) * 2;
            $sttl = !empty($CONFIG["gl_st_upin"]) ? $CONFIG["gl_st_upin"] : 3600;
            $CM = new CacheManager(md5(SUBSITEHOST . $CONFIG["gl_lzid"] . $CONFIG["gl_db_prefix"] . $CONFIG["gl_db_pass"] . $CONFIG["gl_db_user"] . $CONFIG["gl_db_name"]), $gttl, array(111 => array("VISITOR", 512), 112 => array("EVENTS", 128), 113 => array("INTERNAL", 256, $gttl * 2), 114 => array("GROUPS", 256, $gttl * 2), 115 => array("FILTERS", 128, $gttl * 2), 116 => array("DBCNF", 128, $gttl * 2), 117 => array("STATS", 1, $sttl), 118 => array("DUT", 1)));
            $CM->Read();
        }
        loadDatabaseConfig(true, $CONFIG["gl_db_prefix"]);
    }
    return $connection;
}
开发者ID:bgabor,项目名称:RenaniaOpencart,代码行数:33,代码来源:functions.global.inc.php

示例2: InitCacheManager

 static function InitCacheManager()
 {
     if (CacheManager::CachingAvailable(Server::$Configuration->File["gl_caen"]) !== false) {
         $gttl = min(Server::$Configuration->File["poll_frequency_clients"], Server::$Configuration->File["poll_frequency_tracking"]) * 2;
         $tttl = abs(min(Server::$Configuration->File["timeout_clients"], Server::$Configuration->File["timeout_chats"]) - 5);
         $sttl = !empty(Server::$Configuration->File["gl_st_upin"]) ? Server::$Configuration->File["gl_st_upin"] : 3600;
         $static_ttl = 3600;
         CacheManager::$ActiveManager = new CacheManager(md5(SUBSITEHOST . Server::$Configuration->File["gl_lzid"] . Server::$Configuration->File["gl_db_prefix"] . Server::$Configuration->File["gl_db_pass"] . Server::$Configuration->File["gl_db_user"] . Server::$Configuration->File["gl_db_name"]), $gttl, array(DATA_CACHE_KEY_VISITORS => array("VISITOR", 512), DATA_CACHE_KEY_EVENTS => array("EVENTS", 128, $static_ttl), DATA_CACHE_KEY_OPERATORS => array("INTERNAL", 256, $tttl, true), DATA_CACHE_KEY_GROUPS => array("GROUPS", 256, $tttl, true), DATA_CACHE_KEY_FILTERS => array("FILTERS", 128, $static_ttl, true), DATA_CACHE_KEY_DBCONFIG => array("DBCNF", 128, $static_ttl), DATA_CACHE_KEY_STATS => array("STATS", 1, $sttl, true), DATA_CACHE_KEY_DATA_TIMES => array("DUT", 1, $static_ttl)));
         CacheManager::$ActiveManager->Read();
     }
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:11,代码来源:objects.global.inc.php


注:本文中的CacheManager::CachingAvailable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。