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


PHP CacheControl::flushAuthor方法代碼示例

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


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

示例1: flushEntry

 function flushEntry($entryId = null)
 {
     global $database;
     if (empty($entryId)) {
         $entryId = '';
     } else {
         $entryId = $entryId . '\\_';
     }
     $cache = pageCache::getInstance();
     $Entries = POD::queryColumn("SELECT name\n\t\t\tFROM {$database['prefix']}PageCacheLog\n\t\t\tWHERE blogid = " . getBlogId() . "\n\t\t\tAND (name like 'entry\\_" . $entryId . "%' OR name = 'commentRSS_" . $entryId . "')");
     CacheControl::purgeItems($Entries);
     if (!empty($entryId)) {
         $entry = POD::queryCell("SELECT userid, category FROM {$database['prefix']}Entries\n\t\t\t\tWHERE blogid = " . getBlogId() . " AND id = {$entryId}");
         if (!empty($entry)) {
             CacheControl::flushAuthor($entry['userid']);
             CacheControl::flushCategory($entry['category']);
             CacheControl::flushDBCache();
         }
     } else {
         CacheControl::flushAuthor();
         CacheControl::flushCategory();
         CacheControl::flushDBCache();
     }
     unset($cache);
     return true;
 }
開發者ID:hinablue,項目名稱:TextCube,代碼行數:26,代碼來源:Needlworks.Cache.PageCache.Legacy.php

示例2: changeAuthorOfEntries

function changeAuthorOfEntries($blogid, $entries, $userid)
{
    global $database;
    requireModel("blog.feed");
    $targets = array_unique(preg_split('/,/', $entries, -1, PREG_SPLIT_NO_EMPTY));
    foreach ($targets as $entryId) {
        POD::execute("UPDATE {$database['prefix']}Entries SET userid = {$userid} WHERE blogid = {$blogid} AND id = {$entryId}");
    }
    clearFeed();
    CacheControl::flushAuthor();
    return true;
}
開發者ID:hinablue,項目名稱:TextCube,代碼行數:12,代碼來源:blog.entry.php

示例3: changeAuthorOfEntries

function changeAuthorOfEntries($blogid, $entries, $userid)
{
    importlib("model.blog.feed");
    $pool = DBModel::getInstance();
    $targets = array_unique(preg_split('/,/', $entries, -1, PREG_SPLIT_NO_EMPTY));
    foreach ($targets as $entryId) {
        $pool->init("Entries");
        $pool->setQualifier("blogid", "eq", $blogid);
        $pool->setQualifier("id", "eq", $entryId);
        $pool->setAttribute("userid", $userid);
        $pool->update();
    }
    clearFeed();
    CacheControl::flushAuthor();
    return true;
}
開發者ID:ni5am,項目名稱:Textcube,代碼行數:16,代碼來源:entry.php

示例4: flushEntry

 function flushEntry($entryId = null)
 {
     global $database;
     if (empty($entryId)) {
         $entryId = '';
     } else {
         $entryId = intval($entryId);
     }
     $Entries = POD::queryColumn("SELECT name\n\t\t\tFROM {$database['prefix']}PageCacheLog\n\t\t\tWHERE blogid = " . getBlogId() . "\n\t\t\tAND (name like 'entry-" . $entryId . "-%' OR name like '%RSS-" . $entryId . "' OR name like '%ATOM-" . $entryId . "')");
     if (!empty($Entries)) {
         CacheControl::purgeItems($Entries);
     }
     if (!empty($entryId)) {
         $entry = POD::queryRow("SELECT userid, category, published FROM {$database['prefix']}Entries\n\t\t\t\tWHERE blogid = " . getBlogId() . " AND id = {$entryId}");
         if (!empty($entry)) {
             $entry['period'] = Timestamp::getYearMonth($entry['published']);
             CacheControl::flushAuthor($entry['userid']);
             CacheControl::flushCategory($entry['category']);
             CacheControl::flushArchive($entry['period']);
             CacheControl::flushDBCache('entry');
         }
     } else {
         CacheControl::flushAuthor();
         CacheControl::flushCategory();
         CacheControl::flushDBCache('entry');
     }
     return true;
 }
開發者ID:ni5am,項目名稱:Textcube,代碼行數:28,代碼來源:Needlworks.Cache.PageCache.php

示例5: changeAuthorOfEntries

function changeAuthorOfEntries($blogid, $entries, $userid)
{
    $ctx = Model_Context::getInstance();
    requireModel("blog.feed");
    $targets = array_unique(preg_split('/,/', $entries, -1, PREG_SPLIT_NO_EMPTY));
    foreach ($targets as $entryId) {
        POD::execute("UPDATE " . $ctx->getProperty('database.prefix') . "Entries SET userid = {$userid} WHERE blogid = {$blogid} AND id = {$entryId}");
    }
    clearFeed();
    CacheControl::flushAuthor();
    return true;
}
開發者ID:ragi79,項目名稱:Textcube,代碼行數:12,代碼來源:blog.entry.php


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