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

Changeset 5146 for OpenPNE/trunk


Ignore:
Timestamp:
Feb 7, 2008, 11:44:34 PM (15 years ago)
Author:
katafuchi
Message:

#1892 コミュニティ最新書き込み一覧取得時にfunction cacheを使うように修正 新規書き込み、トピック削除時にdropします

Location:
OpenPNE/trunk/webapp/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/db/commu.php

    r5077 r5146  
    808808function db_commu_c_commu_topic_comment_list4c_member_id($c_member_id, $limit)
    809809{
     810
     811    static $is_recurred = false;  //再帰処理中かどうかの判定フラグ
     812
     813    if (!$is_recurred) {  //function cacheのために再帰処理を行う
     814        $is_recurred = true;
     815        $funcargs = func_get_args();
     816        return pne_cache_recursive_call(OPENPNE_FUNCTION_CACHE_LIFETIME_FAST, __FUNCTION__, $funcargs);
     817    }
     818
     819    $is_recurred = false;
     820
     821
    810822    $sql = 'SELECT c_commu_id FROM c_commu_member WHERE c_member_id = ?';
    811823    $c_commu_id_list = db_get_col($sql, array(intval($c_member_id)));
  • OpenPNE/trunk/webapp/lib/util/cache.php

    r4933 r5146  
    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.