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


PHP CacheManager::FlushKey方法代码示例

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


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

示例1: processChatActions

function processChatActions()
{
    global $RVISITOR;
    $count = 0;
    while (isset($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_va"])) {
        $type = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_vd"];
        if ($type == "OperatorSignOff") {
            $op = Server::$Operators[$_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]];
            $op->SignOff();
            CacheManager::FlushKey(DATA_CACHE_KEY_OPERATORS);
        } else {
            if ($type == "SendChatTranscriptTo") {
                $value = 1;
                while (!empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_" . $value])) {
                    DBManager::Execute(true, "UPDATE `" . DB_PREFIX . DATABASE_CHAT_ARCHIVE . "` SET `transcript_sent`=0,`transcript_receiver`='" . DBManager::RealEscape($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]) . "' WHERE `transcript_sent`=1 AND `chat_id`='" . DBManager::RealEscape($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_" . $value]) . "' LIMIT 1;");
                    $value++;
                }
                Communication::SendChatTranscripts(true);
            } else {
                if ($type == "CreatePublicGroup") {
                    if (isset(SERVER::$Operators[$_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"]]) && SERVER::$Operators[$_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"]]->ClientWeb) {
                        continue;
                    }
                    $room = new UserGroup();
                    $room->IsDynamic = true;
                    $room->Id = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"];
                    $room->Descriptions["EN"] = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_1"];
                    $room->Owner = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"];
                    $room->Save();
                    $room->AddMember($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"], false);
                    CacheManager::FlushKey(DATA_CACHE_KEY_OPERATORS);
                    CacheManager::FlushKey(DATA_CACHE_KEY_GROUPS);
                } else {
                    if ($type == "DeletePublicGroup") {
                        $room = new UserGroup();
                        $room->Id = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"];
                        $room->Destroy();
                        CacheManager::FlushKey(DATA_CACHE_KEY_OPERATORS);
                    } else {
                        if ($type == "JoinPublicGroup") {
                            if (isset(SERVER::$Operators[$_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"]])) {
                                if (!SERVER::$Operators[$_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"]]->ClientWeb || SERVER::$Operators[$_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"]]->Status == USER_STATUS_OFFLINE) {
                                    $room = new UserGroup();
                                    $room->Id = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"];
                                    $room->AddMember($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"], false);
                                    CacheManager::FlushKey(DATA_CACHE_KEY_OPERATORS);
                                }
                            }
                        } else {
                            if ($type == "QuitPublicGroup") {
                                $room = new UserGroup();
                                $room->Id = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"];
                                $room->RemoveMember($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_1"]);
                                CacheManager::FlushKey(DATA_CACHE_KEY_OPERATORS);
                            } else {
                                if ($type == "StartOverlayChat") {
                                    $chat = new VisitorChat($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_va"], $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_vb"]);
                                    $chat->RequestInitChat(CALLER_SYSTEM_ID);
                                } else {
                                    if ($type == "AddVisitorComment") {
                                        $visitor = new Visitor($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]);
                                        $visitor->SaveComment(CALLER_SYSTEM_ID, $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_1"]);
                                    } else {
                                        if ($type == "DownloadRecentHistory") {
                                            $RVISITOR = new Visitor($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]);
                                            $RVISITOR->LoadRecentVisits(true, $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_1"]);
                                        } else {
                                            if ($type == "SetTranslation") {
                                                $chat = new VisitorChat($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_va"], $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_vb"]);
                                                $chat->ChatId = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"];
                                                $chat->SetTranslation($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_1"]);
                                            } else {
                                                if ($type == "SetChatTicketParam") {
                                                    $ticket = new CommercialChatVoucher("", $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]);
                                                    $ticket->Load();
                                                    $ticket->SetVoucherParams(!empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_1"]), !empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_2"]), !empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_3"]), !empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_4"]), !empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_5"]), !empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_6"]));
                                                } else {
                                                    if (strlen($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_vb"]) > 0 && strlen($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_va"]) > 0) {
                                                        $chat = new VisitorChat($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_va"], $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_vb"]);
                                                        $chat->ChatId = $_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_vc"];
                                                        $chat->Load();
                                                        if ($type == "SetCallMeBackStatus") {
                                                            $chat->SetCallMeBackStatus($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]);
                                                        } else {
                                                            if ($type == "JoinChatInvisible") {
                                                                $chat->JoinChat(CALLER_SYSTEM_ID, true, !empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]));
                                                            } else {
                                                                if ($type == "JoinChat") {
                                                                    $chat->JoinChat(CALLER_SYSTEM_ID, false, !empty($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]));
                                                                } else {
                                                                    if ($type == "SetPriority") {
                                                                        $chat->SetPriority($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]);
                                                                    } else {
                                                                        if ($type == "SetTargetOperator") {
                                                                            $chat->SetTargetOperator($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]);
                                                                        } else {
                                                                            if ($type == "SetTargetGroup") {
                                                                                $chat->SetTargetGroup($_POST[POST_INTERN_PROCESS_CHAT_ACTION . "_" . $count . "_ve_0"]);
                                                                            } else {
                                                                                if ($type == "AcceptChat") {
//.........这里部分代码省略.........
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:101,代码来源:functions.internal.process.inc.php

示例2: WriteDataUpdateTime

 static function WriteDataUpdateTime($_areaIndex, $_reload = false, $_connector = null, $_prefix = "", $_mtime = 0)
 {
     if (!(isset(CacheManager::$DataUpdateTimesMemory[$_areaIndex]) && CacheManager::$DataUpdateTimesMemory[$_areaIndex] == $_mtime)) {
         CacheManager::$DataUpdateTimesMemory[$_areaIndex] = $_mtime;
         $result = $_connector->Query(true, "SELECT * FROM `" . $_prefix . DATABASE_DATA_UPDATES . "`;");
         if (DBManager::GetRowCount($result) == 0 && !$_reload) {
             $_connector->Query(true, "TRUNCATE `" . $_prefix . DATABASE_DATA_UPDATES . "`;");
             $_connector->Query(true, "INSERT INTO `" . $_prefix . DATABASE_DATA_UPDATES . "` (`update_tickets`, `update_archive`, `update_feedbacks`, `update_emails`, `update_events`, `update_vouchers`, `update_filters`, `update_reports`) VALUES ('0', '0', '0', '0', '0', '0', '0', '0');");
             CacheManager::WriteDataUpdateTime($_areaIndex, true, $_connector, $_prefix, $_mtime);
         } else {
             $_connector->Query(true, "UPDATE `" . $_prefix . DATABASE_DATA_UPDATES . "` SET `" . DBManager::RealEscape($_areaIndex) . "`=" . $_mtime . ";");
             CacheManager::FlushKey(DATA_CACHE_KEY_DATA_TIMES);
         }
     }
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:15,代码来源:objects.global.inc.php

示例3: AddMember

 function AddMember($_id, $_persistant = false)
 {
     DBManager::Execute(true, "REPLACE INTO `" . DB_PREFIX . DATABASE_GROUP_MEMBERS . "` (`user_id`, `group_id`, `persistent`) VALUES ('" . DBManager::RealEscape($_id) . "', '" . DBManager::RealEscape($this->Id) . "', " . ($_persistant ? "1" : "0") . ");");
     CacheManager::FlushKey(DATA_CACHE_KEY_GROUPS);
 }
开发者ID:sgh1986915,项目名称:laravel-eyerideonline,代码行数:5,代码来源:objects.global.users.inc.php


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