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

Changeset 597


Ignore:
Timestamp:
Nov 5, 2006, 8:39:00 PM (14 years ago)
Author:
ebihara
Message:

f_homeにfunction cacheを導入

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

Legend:

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

    r596 r597  
    22862286    //function cache削除
    22872287    pne_cache_drop('p_h_home_c_commu_list4c_member_id', $c_member_id, 9);
     2288    pne_cache_drop('p_f_home_c_commu_list4c_member_id', $c_member_id, 9);
    22882289
    22892290    $data = array(
     
    23022303    //function cache削除
    23032304    pne_cache_drop('p_h_home_c_commu_list4c_member_id', $c_member_id, 9);
     2305    pne_cache_drop('p_f_home_c_commu_list4c_member_id', $c_member_id, 9);
    23042306
    23052307    $sql = 'DELETE FROM c_commu_review' .
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/lib/db/friend.php

    r596 r597  
    597597    pne_cache_drop('p_f_home_c_friend_list4c_member_id', $c_member_id_from, 9);
    598598    pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $c_member_id_from, 5);
     599    pne_cache_drop('p_f_home_c_friend_list4c_member_id', $c_member_id_to, 9);
    599600
    600601    $Week = new Calendar_Week(date('Y'), date('m'), date('d'), 0);
     
    658659    pne_cache_drop('p_f_home_c_friend_list4c_member_id', $c_member_id_from, 9);
    659660    pne_cache_drop('p_h_home_c_diary_friend_list4c_member_id', $c_member_id_from, 5);
     661    pne_cache_drop('p_f_home_c_friend_list4c_member_id', $c_member_id_to, 9);
    660662
    661663    $Week = new Calendar_Week(date('Y'), date('m'), date('d'), 0);
     
    683685    //function cacheを削除
    684686    pne_cache_drop('p_h_home_c_friend_intro_list4c_member_id', $c_member_id_to, 5);
     687    pne_cache_drop('p_f_home_c_friend_comment4c_member_id', $c_member_id_to);
    685688
    686689    $data = array(
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/lib/db/member.php

    r596 r597  
    786786{
    787787    //function cacheの削除
    788     pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     788    pne_cache_drop('db_common_c_member4c_member_id', $c_member_id);
     789    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'friend');
     790    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'public');
    789791
    790792    $data = array(
     
    817819{
    818820    //function cacheの削除
    819     pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     821    pne_cache_drop('db_common_c_member4c_member_id', $c_member_id);
     822    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'friend');
     823    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'public');
    820824
    821825    $data = array('image_filename_'.intval($img_num) => $image_filename);
     
    830834{
    831835    //function cacheの削除
    832     pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     836    pne_cache_drop('db_common_c_member4c_member_id', $c_member_id);
     837    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'friend');
     838    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'public');
    833839
    834840    $sql = 'UPDATE c_member SET';
     
    851857{
    852858    //function cacheの削除
    853     pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     859    pne_cache_drop('db_common_c_member4c_member_id', $c_member_id);
     860    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'friend');
     861    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'public');
    854862
    855863    $sql = 'UPDATE c_member SET image_filename = image_filename_'.intval($img_num).
     
    865873{
    866874    //function cacheの削除
    867     pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     875    pne_cache_drop('db_common_c_member4c_member_id', $c_member_id);
     876    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'friend');
     877    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'public');
    868878
    869879    $data = array(
     
    895905
    896906    //function cacheの削除
    897     pne_cache_drop('db_diary_get_c_diary_list4c_member_id', $c_member_id, 5);
     907    pne_cache_drop('db_common_c_member4c_member_id', $c_member_id);
     908    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'friend');
     909    pne_cache_drop('db_common_c_member_with_profile', $c_member_id, 'public');
    898910
    899911    $data = array(
     
    12081220function db_member_update_c_member_profile($c_member_id, $c_member_profile_list)
    12091221{
     1222    //function cache削除
     1223    pne_cache_drop('db_common_c_profile_list');
     1224
    12101225    foreach ($c_member_profile_list as $item) {
    12111226        $sql = 'DELETE FROM c_member_profile' .
     
    12281243function db_member_insert_c_member_profile($c_member_id, $c_profile_id, $c_profile_option_id, $value, $public_flag)
    12291244{
     1245    //function cache削除
     1246    pne_cache_drop('db_common_c_profile_list');
     1247
    12301248    $data = array(
    12311249        'c_member_id' => intval($c_member_id),
  • OpenPNE/branches/ebihara/prj_tuning_2_5/webapp/modules/pc/page/f_home.php

    r269 r597  
    3434
    3535        $this->set('is_h_prof', 0);
    36         $this->set('inc_navi', fetch_inc_navi('f', $target_c_member_id));
     36        $inc_navi = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'fetch_inc_navi', 'f', $target_c_member_id);
     37        $this->set('inc_navi', $inc_navi);
    3738
    3839        $is_friend = db_friend_is_friend($u, $target_c_member_id);
    3940        if ($is_friend) {
    40             $target_c_member = db_common_c_member_with_profile($target_c_member_id, 'friend');
     41            $target_c_member = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'db_common_c_member_with_profile', $target_c_member_id, 'friend');
    4142            // 自分が書いた紹介文
    4243            $this->set('my_friend_intro', p_f_home_c_friend_intro($u, $target_c_member_id));
    4344        } else {
    44             $target_c_member = db_common_c_member_with_profile($target_c_member_id, 'public');
     45            $target_c_member = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'db_common_c_member_with_profile', $target_c_member_id, 'public');
    4546            // 友達の友達
    4647            $this->set('friend_path', p_f_home_friend_path4c_member_ids($u, $target_c_member_id));
     
    4849
    4950        $this->set('is_friend', $is_friend);
    50         $this->set('c_member', db_common_c_member4c_member_id($u));
    51         $this->set('c_diary_list', db_diary_get_c_diary_list4c_member_id($target_c_member_id, 5, $u));
     51        $c_member = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'db_common_c_member4c_member_id', $u);
     52        $this->set('c_member', $c_member);
     53        $c_diary_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'db_diary_get_c_diary_list4c_member_id', $target_c_member_id, 5, $u);
     54        $this->set('c_diary_list', $c_diary_list);
    5255
    5356        // --- f_home, h_prof 共通処理
     
    6265        $this->set('c_rss_cache_list', p_f_home_c_rss_cache_list4c_member_id($target_c_member_id, 5));
    6366
    64         $this->set('c_friend_comment_list', p_f_home_c_friend_comment4c_member_id($target_c_member_id));
    65         $this->set('c_friend_list', p_f_home_c_friend_list4c_member_id($target_c_member_id, 9));
     67        $c_friend_comment_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_f_home_c_friend_comment4c_member_id', $target_c_member_id);
     68        $this->set('c_friend_comment_list', $c_friend_comment_list);
     69        $c_friend_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_f_home_c_friend_list4c_member_id', $target_c_member_id, 9);
     70        $this->set('c_friend_list', $c_friend_list);
    6671        $this->set('c_friend_count', db_friend_count_friends($target_c_member_id));
    6772        $this->set('user_count', p_common_count_c_commu4c_member_id($target_c_member_id));
    68         $this->set('c_commu_list', p_f_home_c_commu_list4c_member_id($target_c_member_id, 9));
     73        $c_commu_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_f_home_c_commu_list4c_member_id', $target_c_member_id, 9);
     74        $this->set('c_commu_list', $c_commu_list);
    6975        $this->set('c_review_list', db_review_c_review_list4member($target_c_member_id, 5));
    7076
    71         $this->set('profile_list', db_common_c_profile_list());
     77        $profile_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'db_common_c_profile_list');
     78        $this->set('profile_list', $profile_list);
    7279
    7380        // 誕生日まであと何日?
Note: See TracChangeset for help on using the changeset viewer.