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

Changeset 596


Ignore:
Timestamp:
Nov 5, 2006, 5:42:33 PM (13 years ago)
Author:
ebihara
Message:

function cacheのdrop処理をDB関数内に移動

Location:
OpenPNE/branches/ebihara/prj_tuning_2_5/webapp
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/lib/db/bookmark.php

    r546 r596  
    180180function db_bookmark_insert_c_bookmark($c_member_id_from, $c_member_id_to)
    181181{
     182    //function cacheの削除
     183    pne_cache_drop('db_bookmark_member_list', $c_member_id_from, 9);
     184
    182185    $data = array(
    183186        'c_member_id_from' => intval($c_member_id_from),
     
    193196function db_bookmark_delete_c_bookmark($c_member_id_from, $c_member_id_to)
    194197{
     198    //function cacheの削除
     199    pne_cache_drop('db_bookmark_member_list', $c_member_id_from, 9);
     200
    195201    $sql = 'DELETE FROM c_bookmark' .
    196202            ' WHERE c_member_id_from = ? AND c_member_id_to = ?';
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/lib/db/commu.php

    r546 r596  
    22842284function db_commu_join_c_commu($c_commu_id, $c_member_id)
    22852285{
     2286    //function cache削除
     2287    pne_cache_drop('p_h_home_c_commu_list4c_member_id', $c_member_id, 9);
     2288
    22862289    $data = array(
    22872290        'c_commu_id'  => intval($c_commu_id),
     
    22972300function db_commu_delete_c_commu_member($c_commu_id, $c_member_id)
    22982301{
     2302    //function cache削除
     2303    pne_cache_drop('p_h_home_c_commu_list4c_member_id', $c_member_id, 9);
     2304
    22992305    $sql = 'DELETE FROM c_commu_review' .
    23002306           ' WHERE c_commu_id = ? AND c_member_id = ?';
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/lib/db/diary.php

    r546 r596  
    748748function db_diary_insert_c_diary($c_member_id, $subject, $body, $public_flag)
    749749{
     750    //function cacheの削除
     751    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     752
    750753    $data = array(
    751754        'c_member_id' => intval($c_member_id),
     
    766769    $image_filename_1 = '', $image_filename_2 = '', $image_filename_3 = '')
    767770{
     771    //function cacheの削除
     772    $c_diary = db_diary_get_c_diary4id($c_diary_id);
     773    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_diary['c_member_id'], 5);
     774
    768775    $data = array(
    769776        'subject' => $subject,
     
    789796function db_diary_delete_c_diary($c_diary_id)
    790797{
    791     // 画像
     798     //function cacheの削除
    792799    $c_diary = db_diary_get_c_diary4id($c_diary_id);
     800    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_diary['c_member_id'], 5);
     801
     802   // 画像
    793803    image_data_delete($c_diary['image_filename_1']);
    794804    image_data_delete($c_diary['image_filename_2']);
     
    863873function db_diary_insert_c_diary_comment($c_member_id, $c_diary_id, $body)
    864874{
     875    //function cache削除
     876    pne_cache_drop('p_h_home_c_diary_my_comment_list4c_member_id', $c_member_id, 5);
     877
    865878    $data = array(
    866879        'c_member_id' => intval($c_member_id),
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/lib/db/etc.php

    r546 r596  
    260260function db_common_delete_c_member($c_member_id)
    261261{
     262    //function cache削除
     263    pne_cache_drop('p_f_home_c_friend_list4c_member_id', $c_member_id, 9);
     264    pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $c_member_id, 5);
     265
     266    $Week = new Calendar_Week(date('Y'), date('m'), date('d'), 0);
     267    $Week->build();
     268    while ($Day = $Week->fetch()) {
     269        $m = $Day->thisMonth();
     270        $d = $Day->thisDay();
     271        pne_cache_drop('p_h_home_birth4c_member_id', $m, $d, $c_member_id);
     272    }
     273
    262274    //// --- 双方向パターン
    263275    $double = array(intval($c_member_id), intval($c_member_id));
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/lib/db/friend.php

    r546 r596  
    594594function db_friend_insert_c_friend($c_member_id_from, $c_member_id_to)
    595595{
     596    //function cache削除
     597    pne_cache_drop('p_f_home_c_friend_list4c_member_id', $c_member_id_from, 9);
     598    pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $c_member_id_from, 5);
     599
     600    $Week = new Calendar_Week(date('Y'), date('m'), date('d'), 0);
     601    $Week->build();
     602    while ($Day = $Week->fetch()) {
     603        $m = $Day->thisMonth();
     604        $d = $Day->thisDay();
     605        pne_cache_drop('p_h_home_birth4c_member_id', $m, $d, $c_member_id_from);
     606    }
     607
    596608    if (($c_member_id_from < 1) || ($c_member_id_to < 1))
    597609        return false;
     
    643655function db_friend_delete_c_friend($c_member_id_from, $c_member_id_to)
    644656{
     657    //function cache削除
     658    pne_cache_drop('p_f_home_c_friend_list4c_member_id', $c_member_id_from, 9);
     659    pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $c_member_id_from, 5);
     660
     661    $Week = new Calendar_Week(date('Y'), date('m'), date('d'), 0);
     662    $Week->build();
     663    while ($Day = $Week->fetch()) {
     664        $m = $Day->thisMonth();
     665        $d = $Day->thisDay();
     666        pne_cache_drop('p_h_home_birth4c_member_id', $m, $d, $c_member_id_from);
     667    }
     668
    645669    $sql = 'DELETE FROM c_friend' .
    646670            ' WHERE (c_member_id_from = ? AND c_member_id_to = ?)' .
     
    657681function db_friend_update_c_friend_intro($c_member_id_from, $c_member_id_to, $intro)
    658682{
     683    //function cacheを削除
     684    pne_cache_drop('p_h_home_c_friend_intro_list4c_member_id', $c_member_id_to, 5);
     685
    659686    $data = array(
    660687        'intro' => $intro,
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/lib/db/member.php

    r546 r596  
    785785function db_member_config_prof_new($c_member_id, $prof_list)
    786786{
     787    //function cacheの削除
     788    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     789
    787790    $data = array(
    788791        'nickname' => $prof_list['nickname'],
     
    813816function db_member_config_image_new($c_member_id, $image_filename, $img_num)
    814817{
     818    //function cacheの削除
     819    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     820
    815821    $data = array('image_filename_'.intval($img_num) => $image_filename);
    816822    $where = array('c_member_id' => intval($c_member_id));
     
    823829function db_member_delete_c_member_image_new($c_member_id, $img_num)
    824830{
     831    //function cacheの削除
     832    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     833
    825834    $sql = 'UPDATE c_member SET';
    826835    if ($img_num == 1) {
     
    841850function db_member_change_c_member_main_image($c_member_id, $img_num)
    842851{
     852    //function cacheの削除
     853    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     854
    843855    $sql = 'UPDATE c_member SET image_filename = image_filename_'.intval($img_num).
    844856        ' WHERE c_member_id = ?';
     
    852864function db_member_update_c_member_image($c_member_id, $image_filename, $img_num)
    853865{
     866    //function cacheの削除
     867    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     868
    854869    $data = array(
    855870        'image_filename' => $image_filename,
     
    878893    );
    879894    $c_member_id = db_insert('c_member', $data);
     895
     896    //function cacheの削除
     897    pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
    880898
    881899    $data = array(
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/f_bookmark_add.php

    r588 r596  
    2727        //---
    2828
    29         pne_cache_drop('db_bookmark_member_list', $u, 9);
    3029        db_bookmark_insert_c_bookmark($u, $c_member_id_to);
    3130        openpne_redirect('pc', 'page_h_bookmark_list');
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/f_bookmark_delete.php

    r588 r596  
    1010    {
    1111        $u = $GLOBALS['AUTH']->uid();
    12 
    13         pne_cache_drop('db_bookmark_member_list', $u, 9);
    1412        db_bookmark_delete_c_bookmark($u, $requests['target_c_member_id']);
    1513        openpne_redirect('pc', 'page_h_bookmark_list');
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/f_intro_delete.php

    r591 r596  
    2828
    2929        db_friend_update_c_friend_intro($u, $target_c_member_id, "");
    30         pne_cache_drop('p_h_home_c_friend_intro_list4c_member_id', $u, 5);
    3130
    3231        $p = array('target_c_member_id' => $target_c_member_id);
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/f_intro_edit_update_c_friend.php

    r591 r596  
    3838
    3939        db_friend_update_c_friend_intro($u, $target_c_member_id, $body);
    40         pne_cache_drop('p_h_home_c_friend_intro_list4c_member_id', $u, 5);
    4140
    4241        // メール送信
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/f_intro_from_delete.php

    r591 r596  
    2828
    2929        db_friend_update_c_friend_intro($target_c_member_id, $u, "");
    30         pne_cache_drop('p_h_home_c_friend_intro_list4c_member_id', $u, 5);
    3130
    3231        openpne_redirect('pc', 'page_h_home');
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/fh_diary_delete_c_diary.php

    r592 r596  
    2828
    2929        db_diary_delete_c_diary($target_c_diary_id);
    30         pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $u, 5);
    3130
    3231        $p = array('target_c_member_id' => $u);
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/fh_diary_insert_c_diary_comment.php

    r595 r596  
    5858        //日記コメントが書き込まれたので日記自体を未読扱いにする
    5959        db_diary_update_c_diary_is_checked($target_c_diary_id, 0);
    60         pne_cache_drop('p_h_home_c_diary_my_comment_list4c_member_id', $u, 5);
    6160
    6261        $p = array(
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/fh_friend_list_delete_c_friend.php

    r594 r596  
    2424
    2525        db_friend_delete_c_friend($u, $target_c_member_id);
    26         pne_cache_drop('p_f_home_c_friend_list4c_member_id', $u, 9);
    27         pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $u, 5);
    28 
    29         $Week = new Calendar_Week(date('Y'), date('m'), date('d'), 0);
    30         $Week->build();
    31         while ($Day = $Week->fetch()) {
    32             $m = $Day->thisMonth();
    33             $d = $Day->thisDay();
    34             pne_cache_drop('p_h_home_birth4c_member_id', $m, $d, $u);
    35         }
    3626
    3727        openpne_redirect('pc', 'page_h_manage_friend');
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_com_add_insert_c_commu.php

    r593 r596  
    3838        //作成者をコミュメンバーにする
    3939        do_inc_join_c_commu($c_commu_id, $u);
    40         pne_cache_drop('p_h_home_c_commu_list4c_member_id', $u, 9);
    4140
    4241        $p = array('target_c_commu_id' => $c_commu_id);
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_config_image.php

    r590 r596  
    2323
    2424        $c_member = db_common_c_member4c_member_id($u);
    25 
    26         pne_cache_drop('db_common_c_member4c_member_id', $u);
    2725
    2826        if (!$c_member['image_filename_1']) {
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_config_image_change_main_c_member_image.php

    r590 r596  
    1818        // ----------
    1919
    20         pne_cache_drop('db_common_c_member4c_member_id', $u);
    21 
    2220        do_h_config_image_change_c_member_main_image($u, $img_num);
    2321
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_config_image_delete_c_member_image.php

    r590 r596  
    2525
    2626        $c_member = db_common_c_member4c_member_id($u);
    27         pne_cache_drop('db_common_c_member4c_member_id', $u);
    2827        image_data_delete($c_member['image_filename_'.$img_num]);
    2928        do_h_config_image_delete_c_member_image_new($u, $img_num);
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_config_prof.php

    r590 r596  
    2929            $errors = array_merge($errors, $validator->getErrors());
    3030        }
    31 
    32         pne_cache_drop('db_common_c_member4c_member_id', $u);
    3331
    3432        // 値の整合性をチェック(DB)
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_confirm_list_insert_c_friend.php

    r594 r596  
    3333
    3434        do_h_confirm_list_insert_c_friend_mail_send($cfc['c_member_id_from'], $u);
    35         pne_cache_drop('p_f_home_c_friend_list4c_member_id', $u, 9);
    36         pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $u, 5);
    37 
    38         $Week = new Calendar_Week(date('Y'), date('m'), date('d'), 0);
    39         $Week->build();
    40         while ($Day = $Week->fetch()) {
    41             $m = $Day->thisMonth();
    42             $d = $Day->thisDay();
    43             pne_cache_drop('p_h_home_birth4c_member_id', $m, $d, $u);
    44         }
    4535
    4636        $msg = WORD_FRIEND.'登録が完了しました';
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_diary_add_insert_c_diary.php

    r589 r596  
    4444        db_diary_update_c_diary($c_diary_id, $subject, $body, $public_flag, $filename_1, $filename_2, $filename_3);
    4545
    46         pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $u, 5);
    47 
    4846        $p = array('target_c_diary_id' => $c_diary_id);
    4947        openpne_redirect('pc', 'page_fh_diary', $p);
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_diary_edit_insert_c_diary.php

    r589 r596  
    6161        t_image_clear_tmp($sessid);
    6262        db_diary_update_c_diary($target_c_diary_id, $subject, $body, $public_flag, $filename_1, $filename_2, $filename_3);
    63         pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $u, 5);
    6463
    6564        $p = array('target_c_diary_id' => $target_c_diary_id);
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/h_taikai.php

    r594 r596  
    2828        do_common_send_mail_taikai_end_pc($u);
    2929
    30         //自分のフレンドのキャッシュを削除
    31         $friend_list = db_friend_c_member_id_list($u);
    32         $Week = new Calendar_Week(date('Y'), date('m'), date('d'), 0);
    33         $Week->build();
    34         foreach ($friend_list as $c_member_id) {
    35             pne_cache_drop('p_f_home_c_friend_list4c_member_id', $c_member_id, 9);
    36             pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $u, 5);
    37             while ($Day = $Week->fetch()) {
    38                 $m = $Day->thisMonth();
    39                 $d = $Day->thisDay();
    40                 pne_cache_drop('p_h_home_birth4c_member_id', $m, $d, $c_member_id);
    41             }
    42         }
    43 
    4430        //退会処理
    4531        db_common_delete_c_member($u);
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/do/inc_leave_c_commu.php

    r593 r596  
    3535
    3636        db_commu_delete_c_commu_member($target_c_commu_id, $u);
    37         pne_cache_drop('p_h_home_c_commu_list4c_member_id', $u, 9);
    3837
    3938        $p = array('target_c_commu_id' => $target_c_commu_id);
Note: See TracChangeset for help on using the changeset viewer.