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

Changeset 5303


Ignore:
Timestamp:
Feb 22, 2008, 9:04:48 PM (14 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.10.x/webapp/lib
Files:
2 edited

Legend:

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

    r5006 r5303  
    808808function db_commu_c_commu_topic_comment_list4c_member_id($c_member_id, $limit)
    809809{
     810    static $is_recurred = false;  //再帰処理中かどうかの判定フラグ
     811
     812    if (!$is_recurred) {  //function cacheのために再帰処理を行う
     813        $is_recurred = true;
     814        $funcargs = func_get_args();
     815        return pne_cache_recursive_call(OPENPNE_FUNCTION_CACHE_LIFETIME_FAST, __FUNCTION__, $funcargs);
     816    }
     817
     818    $is_recurred = false;
     819
    810820    $sql = 'SELECT c_commu_id FROM c_commu_member WHERE c_member_id = ?';
    811821    $c_commu_id_list = db_get_col($sql, array(intval($c_member_id)));
     
    24152425function db_commu_insert_c_commu_topic_comment($c_commu_id, $c_commu_topic_id, $c_member_id, $body)
    24162426{
     2427    cache_drop_c_commu_list4c_member_id($c_member_id);
     2428
    24172429    $number = _do_c_commu_topic_comment_number4c_commu_topic_id($c_commu_topic_id);
    24182430
     
    25772589    //function cacheの削除
    25782590    cache_drop_c_commu_topic($topic['c_commu_id']);
     2591    cache_drop_c_commu_list4c_member_id($topic['c_member_id']);
    25792592
    25802593    $data = array(
     
    26152628function db_commu_insert_c_commu_topic_comment_3($comment)
    26162629{
     2630    cache_drop_c_commu_list4c_member_id($comment['c_member_id']);
     2631
    26172632    $data = array(
    26182633        'c_commu_id'       => intval($comment['c_commu_id']),
  • OpenPNE/branches/stable-2.10.x/webapp/lib/util/cache.php

    r4632 r5303  
    163163    pne_cache_drop('db_commu_c_commu_list_lastupdate4c_member_id', $c_member_id, 5);
    164164    pne_cache_drop('db_commu_c_commu_list4c_member_id_2', $c_member_id, 9);
     165    pne_cache_drop('db_commu_c_commu_topic_comment_list4c_member_id', $c_member_id, 5);
    165166    $c_member_id = (string)$c_member_id;
    166167    pne_cache_drop('db_commu_c_commu_list_lastupdate4c_member_id', $c_member_id, 5);
    167168    pne_cache_drop('db_commu_c_commu_list4c_member_id_2', $c_member_id, 9);
     169    pne_cache_drop('db_commu_c_commu_topic_comment_list4c_member_id', $c_member_id, 5);
    168170}
    169171
Note: See TracChangeset for help on using the changeset viewer.