ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 5304


Ignore:
Timestamp:
Feb 22, 2008, 9:27:03 PM (12 years ago)
Author:
ebihara
Message:

#1892:db_commu_c_commu_topic_comment_list4c_member_id()に function cache 導入(r5146,r5250,r5282,r5283取りこみ)

Location:
OpenPNE/branches/stable-2.8.x/webapp/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/stable-2.8.x/webapp/lib/db/commu.php

    r4980 r5304  
    797797function db_commu_c_commu_topic_comment_list4c_member_id($c_member_id, $limit)
    798798{
     799    static $is_recurred = false;  //再帰処理中かどうかの判定フラグ
     800
     801    if (!$is_recurred) {  //function cacheのために再帰処理を行う
     802        $is_recurred = true;
     803        $funcargs = func_get_args();
     804        return pne_cache_recursive_call(OPENPNE_FUNCTION_CACHE_LIFETIME_FAST, __FUNCTION__, $funcargs);
     805    }
     806
     807    $is_recurred = false;
     808
    799809    $sql = 'SELECT c_commu_id FROM c_commu_member WHERE c_member_id = ?';
    800810    $c_commu_id_list = db_get_col($sql, array(intval($c_member_id)));
     
    23172327function db_commu_insert_c_commu_topic_comment($c_commu_id, $c_commu_topic_id, $c_member_id, $body)
    23182328{
     2329    cache_drop_c_commu_list4c_member_id($c_member_id);
     2330
    23192331    $number = _do_c_commu_topic_comment_number4c_commu_topic_id($c_commu_topic_id);
    23202332
     
    24652477    //function cacheの削除
    24662478    cache_drop_c_commu_topic($topic['c_commu_id']);
     2479    cache_drop_c_commu_list4c_member_id($topic['c_member_id']);
    24672480
    24682481    $data = array(
     
    24892502function db_commu_insert_c_commu_topic_comment_3($comment)
    24902503{
     2504    cache_drop_c_commu_list4c_member_id($comment['c_member_id']);
     2505
    24912506    $data = array(
    24922507        'c_commu_id'       => intval($comment['c_commu_id']),
  • OpenPNE/branches/stable-2.8.x/webapp/lib/util/cache.php

    r4643 r5304  
    158158    pne_cache_drop('db_commu_c_commu_list_lastupdate4c_member_id', $c_member_id, 5);
    159159    pne_cache_drop('db_commu_c_commu_list4c_member_id_2', $c_member_id, 9);
     160    pne_cache_drop('db_commu_c_commu_topic_comment_list4c_member_id', $c_member_id, 5);
    160161    $c_member_id = (string)$c_member_id;
    161162    pne_cache_drop('db_commu_c_commu_list_lastupdate4c_member_id', $c_member_id, 5);
    162163    pne_cache_drop('db_commu_c_commu_list4c_member_id_2', $c_member_id, 9);
     164    pne_cache_drop('db_commu_c_commu_topic_comment_list4c_member_id', $c_member_id, 5);
    163165}
    164166
Note: See TracChangeset for help on using the changeset viewer.