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

Changeset 2079


Ignore:
Timestamp:
Mar 13, 2007, 4:48:12 PM (13 years ago)
Author:
takanashi
Message:

#516 型違いの引数に対してもfunction cacheを行うように(r2071)

Location:
OpenPNE/branches/2_6/webapp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2_6/webapp/lib/util/cache.php

    r1477 r2079  
    4444{
    4545    $arg_list = func_get_args();
    46 
     46   
    4747    if (OPENPNE_USE_FUNCITON_CACHE) {
    4848        $cache =& get_cache_lite_function();
     
    7575function cache_drop_c_member($c_member_id)
    7676{
     77    $c_member_id = (int)$c_member_id;
     78    pne_cache_drop('db_friend_c_friend_id_list4c_member_id', $c_member_id, 9);  //フレンドリスト
     79        pne_cache_drop('db_friend_c_friend_list_random4c_member_id', $c_member_id, 5);
     80    pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $c_member_id, 5);  //最新日記フィード
     81    $c_member_id = (string)$c_member_id;
    7782    pne_cache_drop('db_friend_c_friend_id_list4c_member_id', $c_member_id, 9);  //フレンドリスト
    7883        pne_cache_drop('db_friend_c_friend_list_random4c_member_id', $c_member_id, 5);
     
    8792        $m = $Day->thisMonth();
    8893        $d = $Day->thisDay();
     94        $c_member_id = (int)$c_member_id;
    8995        pne_cache_drop('db_member_birth4c_member_id', $m, $d, $c_member_id);
     96        $c_member_id = (string)$c_member_id;
     97        pne_cache_drop('db_member_birth4c_member_id', $m, $d, $c_member_id);
    9098    }
    9199
     
    98106function cache_drop_c_commu($c_commu_id)
    99107{
     108    $c_commu_id = (int)$c_commu_id;
    100109    pne_cache_drop('db_commu_c_commu4c_commu_id_k',$c_commu_id);
    101110    pne_cache_drop('db_commu_c_commu_member_list_random4c_commu_id', $c_commu_id, 5);
    102111    pne_cache_drop('db_commu_c_commu_member_list4c_commu_id', $c_commu_id, 9);
    103112    pne_cache_drop('db_commu_c_commu4c_commu_id2', $c_commu_id);
     113    $c_commu_id = (string)$c_commu_id;
     114    pne_cache_drop('db_commu_c_commu4c_commu_id_k',$c_commu_id);
     115    pne_cache_drop('db_commu_c_commu_member_list_random4c_commu_id', $c_commu_id, 5);
     116    pne_cache_drop('db_commu_c_commu_member_list4c_commu_id', $c_commu_id, 9);
     117    pne_cache_drop('db_commu_c_commu4c_commu_id2', $c_commu_id);
    104118
    105119    $c_commu_topic_list = db_commu_new_topic_comment4c_commu_id($c_commu_id, 7);
     
    109123    foreach ($c_commu_bbs_list as $c_commu_topic_id)
    110124    {
     125        $c_commu_topic_id = (int)$c_commu_topic_id;
    111126        cache_drop_c_commu_topic($c_commu_topic_id);
     127        $c_commu_topic_id = (string)$c_commu_topic_id;
     128        cache_drop_c_commu_topic($c_commu_topic_id);
    112129    }
    113130}
     
    118135function cache_drop_c_commu_topic($c_commu_topic_id)
    119136{
     137    $c_commu_topic_id = (int)$c_commu_topic_id;
    120138    pne_cache_drop('db_commu_new_topic_comment4c_commu_id', $c_commu_topic_id, 7);
    121139    pne_cache_drop('db_commu_new_topic_comment4c_commu_id', $c_commu_topic_id, 7, 0);
    122140    pne_cache_drop('db_commu_new_topic_comment4c_commu_id', $c_commu_topic_id, 7, 1);
     141    $c_commu_topic_id = (string)$c_commu_topic_id;
     142    pne_cache_drop('db_commu_new_topic_comment4c_commu_id', $c_commu_topic_id, 7);
     143    pne_cache_drop('db_commu_new_topic_comment4c_commu_id', $c_commu_topic_id, 7, 0);
     144    pne_cache_drop('db_commu_new_topic_comment4c_commu_id', $c_commu_topic_id, 7, 1);
    123145}
    124146
     
    128150function cache_drop_c_commu_list4c_member_id($c_member_id)
    129151{
     152    $c_member_id = (int)$c_member_id;
    130153    pne_cache_drop('db_commu_c_commu_list_lastupdate4c_member_id', $c_member_id, 5);
    131154    pne_cache_drop('db_commu_c_commu_list4c_member_id_3', $c_member_id, 9);
    132155    pne_cache_drop('db_commu_c_commu_list4c_member_id_2', $c_member_id, 9);
     156    $c_member_id = (string)$c_member_id;
     157    pne_cache_drop('db_commu_c_commu_list_lastupdate4c_member_id', $c_member_id, 5);
     158    pne_cache_drop('db_commu_c_commu_list4c_member_id_3', $c_member_id, 9);
     159    pne_cache_drop('db_commu_c_commu_list4c_member_id_2', $c_member_id, 9);
    133160}
    134161
     
    139166function cache_drop_c_friend_intro($c_member_id)
    140167{
     168    $c_member_id = (int)$c_member_id;
    141169    pne_cache_drop('db_friend_c_friend_intro_list4c_member_id', $c_member_id, 5);
    142170    pne_cache_drop('db_friend_c_friend_comment4c_member_id', $c_member_id);
     171    $c_member_id = (string)$c_member_id;
     172    pne_cache_drop('db_friend_c_friend_intro_list4c_member_id', $c_member_id, 5);
     173    pne_cache_drop('db_friend_c_friend_comment4c_member_id', $c_member_id);
    143174}
    144175
     
    149180function cache_drop_c_member_profile($c_member_id)
    150181{
     182    $c_member_id = (int)$c_member_id;
    151183    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id);
    152184    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, false, false, 'public');
     
    163195    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, true, true, 'private');
    164196    pne_cache_drop('db_member_c_profile_list');
     197    $c_member_id = (string)$c_member_id;
     198    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id);
     199    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, false, false, 'public');
     200    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, false, false, 'friend');
     201    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, false, false, 'private');
     202    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, false, true, 'public');
     203    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, false, true, 'friend');
     204    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, false, true, 'private');
     205    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, true, false, 'public');
     206    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, true, false, 'friend');
     207    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, true, false, 'private');
     208    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, true, true, 'public');
     209    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, true, true, 'friend');
     210    pne_cache_drop('db_member_c_member4c_member_id', $c_member_id, true, true, 'private');
    165211}
    166212
     
    170216function cache_drop_c_bookmark($c_member_id)
    171217{
     218    $c_member_id = (int)$c_member_id;
    172219    pne_cache_drop('db_bookmark_member_list', $c_member_id, 9);
     220    $c_member_id = (string)$c_member_id;
     221    pne_cache_drop('db_bookmark_member_list', $c_member_id, 9);
    173222}
    174223?>
  • OpenPNE/branches/2_6/webapp/modules/admin/lib/db_admin.php

    r2078 r2079  
    484484function db_admin_update_is_login_rejected($c_member_id)
    485485{
     486    // function cacheを削除
     487    cache_drop_c_member_profile($c_member_id);
     488
    486489    $sql = 'SELECT is_login_rejected FROM c_member WHERE c_member_id = ?';
    487490    $params = array(intval($c_member_id));
Note: See TracChangeset for help on using the changeset viewer.