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

Changeset 619


Ignore:
Timestamp:
Nov 7, 2006, 9:30:05 PM (14 years ago)
Author:
takanashi
Message:

チューニング・ファンクションキャッシュ取り込み

Location:
OpenPNE/trunk/webapp
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/init.inc

    r546 r619  
    122122ini_set('arg_separator.output', '&');
    123123
     124// ファンクションキャッシュ有効期限用定数
     125define('OPENPNE_FUNCTION_CACHE_LIFETIME_SHORT' , 1200);
     126define('OPENPNE_FUNCTION_CACHE_LIFETIME_LONG' , 3600);
     127
     128
    124129?>
  • OpenPNE/trunk/webapp/lib/db/bookmark.php

    r546 r619  
    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/trunk/webapp/lib/db/commu.php

    r599 r619  
    18801880    $is_display_map = null, $map_latitude = null, $map_longitude = null, $map_zoom = null)
    18811881{
     1882    //function cacheの削除
     1883    cache_drop_c_commu($c_commu_id);
     1884
    18821885    $data = array(
    18831886        'name' => $name,
     
    19061909function db_commu_update_c_commu_image_filename($c_commu_id, $image_filename)
    19071910{
     1911    //function cacheの削除
     1912    cache_drop_c_commu($c_commu_id);
     1913
    19081914    $data = array('image_filename' => $image_filename);
    19091915    $where = array('c_commu_id' => intval($c_commu_id));
     
    19161922function db_commu_delete_c_commu_image_filename($c_commu_id)
    19171923{
     1924    //function cacheの削除
     1925    cache_drop_c_commu($c_commu_id);
     1926
    19181927    $data = array('image_filename' => '');
    19191928    $where = array('c_commu_id' => intval($c_commu_id));
     
    20332042function db_commu_delete_c_commu_topic($c_commu_topic_id)
    20342043{
     2044    //function cacheの削除
     2045    cache_drop_c_commu_topic($c_commu_topic_id);
     2046
    20352047    // c_commu_topic_comment(画像)
    20362048    $sql = 'SELECT image_filename1, image_filename2, image_filename3' .
     
    21942206function db_commu_insert_c_commu_topic($topic)
    21952207{
     2208    //function cacheの削除
     2209    cache_drop_c_commu_topic($topic['c_commu_id']);
     2210
    21962211    $data = array(
    21972212        'c_commu_id'  => intval($topic['c_commu_id']),
     
    22842299function db_commu_join_c_commu($c_commu_id, $c_member_id)
    22852300{
     2301    //function cache削除
     2302    cache_drop_c_commu($c_commu_id);
     2303    cache_drop_c_commu_list4c_member_id($c_member_id);
     2304
    22862305    $data = array(
    22872306        'c_commu_id'  => intval($c_commu_id),
     
    22972316function db_commu_delete_c_commu_member($c_commu_id, $c_member_id)
    22982317{
     2318    //function cache削除
     2319    cache_drop_c_commu($c_commu_id);
     2320    cache_drop_c_commu_list4c_member_id($c_member_id);
     2321
    22992322    $sql = 'DELETE FROM c_commu_review' .
    23002323           ' WHERE c_commu_id = ? AND c_member_id = ?';
  • OpenPNE/trunk/webapp/lib/db/diary.php

    r546 r619  
    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/trunk/webapp/lib/db/etc.php

    r546 r619  
    260260function db_common_delete_c_member($c_member_id)
    261261{
     262    //function cache削除
     263    cache_drop_c_member($c_member_id);
     264
    262265    //// --- 双方向パターン
    263266    $double = array(intval($c_member_id), intval($c_member_id));
     
    425428function db_common_delete_c_commu($c_commu_id)
    426429{
     430    //function cacheの削除
     431    pne_cache_drop('p_c_home_c_commu4c_commu_id', $c_commu_id);
     432
    427433    $single = array(intval($c_commu_id));
    428434
  • OpenPNE/trunk/webapp/lib/db/friend.php

    r546 r619  
    594594function db_friend_insert_c_friend($c_member_id_from, $c_member_id_to)
    595595{
     596    //function cache削除
     597    cache_drop_c_member($c_member_id_from);
     598    cache_drop_c_member($c_member_id_to);
     599
    596600    if (($c_member_id_from < 1) || ($c_member_id_to < 1))
    597601        return false;
     
    643647function db_friend_delete_c_friend($c_member_id_from, $c_member_id_to)
    644648{
     649    //function cache削除
     650    cache_drop_c_member($c_member_id_from);
     651    cache_drop_c_member($c_member_id_to);
     652
    645653    $sql = 'DELETE FROM c_friend' .
    646654            ' WHERE (c_member_id_from = ? AND c_member_id_to = ?)' .
     
    657665function db_friend_update_c_friend_intro($c_member_id_from, $c_member_id_to, $intro)
    658666{
     667    //function cacheを削除
     668    pne_cache_drop('p_h_home_c_friend_intro_list4c_member_id', $c_member_id_to, 5);
     669    pne_cache_drop('p_f_home_c_friend_comment4c_member_id', $c_member_id_to);
     670
    659671    $data = array(
    660672        'intro' => $intro,
  • OpenPNE/trunk/webapp/lib/db/member.php

    r546 r619  
    785785function db_member_config_prof_new($c_member_id, $prof_list)
    786786{
     787    //function cacheの削除
     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');
     791
    787792    $data = array(
    788793        'nickname' => $prof_list['nickname'],
     
    813818function db_member_config_image_new($c_member_id, $image_filename, $img_num)
    814819{
     820    //function cacheの削除
     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');
     824
    815825    $data = array('image_filename_'.intval($img_num) => $image_filename);
    816826    $where = array('c_member_id' => intval($c_member_id));
     
    823833function db_member_delete_c_member_image_new($c_member_id, $img_num)
    824834{
     835    //function cacheの削除
     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');
     839
    825840    $sql = 'UPDATE c_member SET';
    826841    if ($img_num == 1) {
     
    841856function db_member_change_c_member_main_image($c_member_id, $img_num)
    842857{
     858    //function cacheの削除
     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');
     862
    843863    $sql = 'UPDATE c_member SET image_filename = image_filename_'.intval($img_num).
    844864        ' WHERE c_member_id = ?';
     
    852872function db_member_update_c_member_image($c_member_id, $image_filename, $img_num)
    853873{
     874    //function cacheの削除
     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');
     878
    854879    $data = array(
    855880        'image_filename' => $image_filename,
     
    878903    );
    879904    $c_member_id = db_insert('c_member', $data);
     905
     906    //function cacheの削除
     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');
    880910
    881911    $data = array(
     
    11901220function db_member_update_c_member_profile($c_member_id, $c_member_profile_list)
    11911221{
     1222    //function cache削除
     1223    pne_cache_drop('db_common_c_profile_list');
     1224
    11921225    foreach ($c_member_profile_list as $item) {
    11931226        $sql = 'DELETE FROM c_member_profile' .
     
    12101243function db_member_insert_c_member_profile($c_member_id, $c_profile_id, $c_profile_option_id, $value, $public_flag)
    12111244{
     1245    //function cache削除
     1246    pne_cache_drop('db_common_c_profile_list');
     1247
    12121248    $data = array(
    12131249        'c_member_id' => intval($c_member_id),
  • OpenPNE/trunk/webapp/lib/db/message.php

    r546 r619  
    181181function db_message_c_message_trash_list4c_member_id4range($c_member_id, $page, $page_size)
    182182{
    183     $where = "(" .
    184             "c_member_id_from = ?" .
     183    $where_from = "c_member_id_from = ?" .
    185184            " AND is_deleted_from = 1" .
    186             " AND is_kanzen_sakujo_from = 0" .
    187         ") OR (" .
    188             "c_member_id_to = ?" .
     185            " AND is_kanzen_sakujo_from = 0";
     186
     187    $sql = 'SELECT * FROM c_message WHERE '. $where_from . ' ORDER BY r_datetime DESC';
     188    $sql_num = 'SELECT COUNT(*) FROM c_message WHERE '. $where_from;
     189    $params = array(intval($c_member_id));
     190    $c_message_list_from = db_get_all_page($sql, 1, ($page_size * ($page + 1)), $params);
     191    $c_message_num_from = db_get_one($sql_num, $params);
     192
     193    $where_to = "c_member_id_to = ?" .
    189194            " AND is_deleted_to = 1" .
    190             " AND is_kanzen_sakujo_to = 0" .
    191         ")";
    192 
    193     $sql = 'SELECT * FROM c_message WHERE '. $where . ' ORDER BY r_datetime DESC';
    194     $params = array(intval($c_member_id), intval($c_member_id));
    195     $c_message_list = db_get_all_page($sql, $page, $page_size, $params);
    196 
    197     $sql = 'SELECT COUNT(*) FROM c_message WHERE ' . $where;
    198     $total_num = db_get_one($sql, $params);
     195            " AND is_kanzen_sakujo_to = 0";
     196
     197    $sql = 'SELECT * FROM c_message WHERE '. $where_to . ' ORDER BY r_datetime DESC';
     198    $sql_num = 'SELECT COUNT(*) FROM c_message WHERE '. $where_to;
     199    $c_message_list_to = db_get_all_page($sql, 1, ($page_size * ($page + 1)), $params);
     200    $c_message_num_to = db_get_one($sql_num, $params);
     201
     202    $c_message_list = array_merge($c_message_list_from, $c_message_list_to);
     203
     204    foreach ($c_message_list as $key => $row) {
     205       $c_message_id[$key] = intval($row['c_message_id']);
     206    }
     207    array_multisort($c_message_id, SORT_DESC, $c_message_list);
     208    $c_message_list = array_slice($c_message_list, ($page_size * ($page - 1) + 1), $page_size);
     209
     210    $total_num = $c_message_num_from + $c_message_num_to;
    199211
    200212    if ($total_num != 0) {
  • OpenPNE/trunk/webapp/lib/util.inc.php

    r102 r619  
    1313require_once dirname(__FILE__) . '/util/message.php';
    1414require_once dirname(__FILE__) . '/util/emoji.php';
     15require_once dirname(__FILE__) . '/util/cache.php';
    1516
    1617?>
  • OpenPNE/trunk/webapp/lib/util/util.php

    r266 r619  
    397397//---
    398398
    399 function &get_cache_lite_function()
    400 {
    401     static $instance;
    402     if (empty($instance)) {
    403         include_once 'Cache/Lite/Function.php';
    404         $options = array(
    405             'cacheDir' => OPENPNE_VAR_DIR . '/function_cache/',
    406             'hashedDirectoryLevel' => 2,
    407             'hashedDirectoryUmask' => 0777,
    408         );
    409         $instance = new Cache_Lite_Function($options);
    410     }
    411     return $instance;
    412 }
    413 
    414 /**
    415  * call function cache
    416  */
    417 function pne_cache_call()
    418 {
    419     $arg_list = func_get_args();
    420     $lifetime = array_shift($arg_list);
    421 
    422     if (OPENPNE_USE_FUNCTION_CACHE) {
    423         $cache =& get_cache_lite_function();
    424         $cache->setOption('lifetime', intval($lifetime));
    425         return call_user_func_array(array(&$cache, 'call'), $arg_list);
    426     } else {
    427         $function = array_shift($arg_list);
    428         return call_user_func_array($function, $arg_list);
    429     }
    430 }
    431 
    432 /**
    433  * drop function cache
    434  */
    435 function pne_cache_drop()
    436 {
    437     $arg_list = func_get_args();
    438 
    439     if (OPENPNE_USE_FUNCITON_CACHE) {
    440         $cache =& get_cache_lite_funcion();
    441         return call_user_func_array(array(&$cache, 'drop'), $arg_list);
    442     } else {
    443         return true;
    444     }
    445 }
    446 
    447 //---
    448 
    449399/**
    450400 * Check c_diary.public_flag
  • OpenPNE/trunk/webapp/modules/admin/do/update_c_navi.php

    r2 r619  
    1414            $requests['url'],
    1515            $requests['caption']);
     16
     17        pne_cache_drop('fetch_inc_navi', $requests['navi_type']);
     18
    1619        admin_client_redirect('edit_c_navi', '変更しました');
    1720    }
  • OpenPNE/trunk/webapp/modules/pc/page/c_home.php

    r312 r619  
    1212        $c_commu_id = $requests['target_c_commu_id'];
    1313
    14         $c_commu = p_c_home_c_commu4c_commu_id($c_commu_id);
     14        $c_commu = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_c_home_c_commu4c_commu_id', $c_commu_id);
    1515        //コミュニティの存在の有無
    1616        if (!$c_commu) {
     
    1818        }
    1919
    20         $this->set('inc_navi', fetch_inc_navi('c', $c_commu_id));
     20        $inc_navi = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'fetch_inc_navi', 'c', $c_commu_id);
     21        $this->set('inc_navi', $inc_navi);
    2122
    2223        $this->set('c_commu', $c_commu);
     
    3031
    3132        //コミュニティメンバー
    32         $this->set('c_commu_member_list', p_c_home_c_commu_member_list4c_commu_id($c_commu_id, 9));
     33        $c_commu_member_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_c_home_c_commu_member_list4c_commu_id', $c_commu_id, 9);
     34        $this->set('c_commu_member_list', $c_commu_member_list);
    3335
    3436        //非公開コミュニティに管理者から招待されたかどうか
     
    3638
    3739        //参加コミュニティの新着トピック書き込み
    38         $this->set('new_topic_comment', p_c_home_new_topic_comment4c_commu_id($c_commu_id, 7));
     40        $new_topic_comment = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_c_home_new_topic_comment4c_commu_id', $c_commu_id, 7);
     41        $this->set('new_topic_comment', $new_topic_comment);
    3942        //参加コミュニティの新着イベント書き込み
    40         $this->set('new_topic_comment_event', p_c_home_new_topic_comment4c_commu_id($c_commu_id, 7, 1));
     43        $new_topic_comment_event = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_c_home_new_topic_comment4c_commu_id', $c_commu_id, 7, 1);
     44        $this->set('new_topic_comment_event', $new_topic_comment_event);
    4145        //参加コミュニティの新着おすすめレビュー
    4246        $this->set('new_commu_review', p_c_home_new_commu_review4c_commu_id($c_commu_id, 7));
  • OpenPNE/trunk/webapp/modules/pc/page/f_home.php

    r269 r619  
    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        // 誕生日まであと何日?
  • OpenPNE/trunk/webapp/modules/pc/page/h_home.php

    r102 r619  
    1616        $u = $GLOBALS['AUTH']->uid();
    1717
    18         $this->set('inc_navi', fetch_inc_navi('h'));
     18        $inc_navi = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'fetch_inc_navi', 'h');
     19        $this->set('inc_navi', $inc_navi);
    1920
    2021        /// infomation ///
     
    4950
    5051        // メンバ情報
    51         $this->set('c_member', db_common_c_member4c_member_id($u));
     52        $c_member = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'db_common_c_member4c_member_id', $u);
     53        $this->set('c_member', $c_member);
    5254        // フレンドリスト
    53         $this->set('c_friend_list', p_f_home_c_friend_list4c_member_id($u, 9));
     55        $c_friend_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_f_home_c_friend_list4c_member_id', $u, 9);
     56        $this->set('c_friend_list', $c_friend_list);
    5457        $this->set('c_friend_count', db_friend_count_friends($u));
    5558        // 参加コミュニティ
    56         $this->set('c_commu_user_list', p_h_home_c_commu_list4c_member_id($u, 9));
     59        $c_commu_user_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_h_home_c_commu_list4c_member_id', $u, 9);
     60        $this->set('c_commu_user_list', $c_commu_user_list);
    5761        $this->set('fh_com_count_user', p_common_count_c_commu4c_member_id($u));
    5862
     
    6064
    6165        // フレンド最新日記
    62         $this->set('c_diary_friend_list', p_h_home_c_diary_friend_list4c_member_id($u, 5));
     66        $c_diary_friend_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_h_home_c_diary_friend_list4c_member_id', $u, 5);
     67        $this->set('c_diary_friend_list', $c_diary_friend_list);
    6368        // フレンド最新blog
    6469        $this->set('c_rss_cache_list', p_h_diary_list_friend_c_rss_cache_list($u, 5));
    6570        // 日記コメント記入履歴
    66         $this->set('c_diary_my_comment_list', p_h_home_c_diary_my_comment_list4c_member_id($u, 5));
     71        $c_diary_my_comment_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_h_home_c_diary_my_comment_list4c_member_id', $u, 5);
     72        $this->set('c_diary_my_comment_list', $c_diary_my_comment_list);
    6773        // 参加コミュニティの新着書き込み
    6874        $this->set('c_commu_topic_comment_list', p_h_home_c_commu_topic_comment_list4c_member_id($u, 5));
     
    7379
    7480        // 日記
    75         $this->set('c_diary_list', db_diary_get_c_diary_list4c_member_id($u, 5));
     81        $c_diary_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'db_diary_get_c_diary_list4c_member_id', $u, 5);
     82        $this->set('c_diary_list', $c_diary_list);
    7683        // 外部blog
    7784        $this->set('c_blog_list', p_h_home_h_blog_list_friend4c_member_id($u, 5, 1));
     
    8289
    8390        // 紹介文
    84         $this->set('c_friend_intro_list', p_h_home_c_friend_intro_list4c_member_id($u, 5));
     91        $c_friend_intro_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_h_home_c_friend_intro_list4c_member_id', $u, 5);
     92        $this->set('c_friend_intro_list', $c_friend_intro_list);
    8593
    8694        // 今日の日付、曜日
     
    106114
    107115            //お気に入りのメンバ
    108             $this->set('bookmark_member_list', db_bookmark_member_list($u, 9));
     116            $bookmark_member_list = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'db_bookmark_member_list', $u, 9);
     117            $this->set('bookmark_member_list', $bookmark_member_list);
    109118            $this->set('bookmark_count', db_bookmark_count($u));
    110119        }
     
    134143            $m = $Day->thisMonth();
    135144            $d = $Day->thisDay();
     145            $birth = pne_cache_call(OPENPNE_FUNCTION_CACHE_LIFETIME_LONG, 'p_h_home_birth4c_member_id', $m, $d, $u);
    136146            $item = array(
    137147                'year'=> $y,
     
    140150                'dayofweek'=>$dayofweek[$i++],
    141151                'now' => false,
    142                 'birth' => p_h_home_birth4c_member_id($m, $d, $u),
     152                'birth' => $birth,
    143153                'event' => p_h_home_event4c_member_id($y, $m, $d, $u),
    144154                'schedule' => p_h_calendar_c_schedule_list4date($y, $m, $d, $u),
Note: See TracChangeset for help on using the changeset viewer.