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

Changeset 1665


Ignore:
Timestamp:
Jan 18, 2007, 3:51:27 PM (13 years ago)
Author:
ebihara
Message:

tuningブランチのfunction chache関連の修正を取り込み

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/ebihara/prj_dev27_tuning/webapp/lib/db/message.php

    r973 r1665  
    3232function db_message_count_c_message_not_is_read4c_member_to_id($c_member_id_to)
    3333{
     34    static $is_recurred = false;  //再帰処理中かどうかの判定フラグ
     35
     36    if (!$is_recurred) {  //function cacheのために再帰処理を行う
     37        $is_recurred = true;
     38        $funcargs = func_get_args();
     39        return pne_cache_recursive_call(OPENPNE_FUNCTION_CACHE_LIFETIME_FAST, __FUNCTION__, $funcargs);
     40    }
     41
     42    $is_recurred = false;
     43
    3444    $sql = 'SELECT COUNT(*) FROM c_message WHERE c_member_id_to = ?' .
    3545            ' AND is_read = 0 AND is_send = 1';
     
    540550        'c_member_id_to' => intval($c_member_id),
    541551    );
     552    pne_cache_drop('db_message_count_c_message_not_is_read4c_member_to_id', $c_member_id);
    542553    return db_update('c_message', $data, $where);
    543554}
     
    568579    do_common_send_message_mail_send($c_member_id_to, $c_member_id_from);
    569580    do_common_send_message_mail_send_ktai($c_member_id_to, $c_member_id_from);
     581    pne_cache_drop('db_message_count_c_message_not_is_read4c_member_to_id', $c_member_id_to);
    570582
    571583    return $c_message_id;
     
    577589    //メッセージ
    578590    db_message_insert_c_message_syoudaku($c_member_id_from, $c_member_id_to, $subject, $body);
     591    pne_cache_drop('db_message_count_c_message_not_is_read4c_member_to_id', $c_member_id_to);
    579592
    580593    do_common_send_message_syoudaku_mail_send($c_member_id_to, $c_member_id_from);
     
    586599    //メッセージ
    587600    db_message_insert_c_message($c_member_id_from, $c_member_id_to, $subject, $body);
     601    pne_cache_drop('db_message_count_c_message_not_is_read4c_member_to_id', $c_member_id_to);
    588602
    589603    do_common_send_message_syoukai_commu_mail_send($c_member_id_to, $c_member_id_from);
     
    595609    //メッセージ
    596610    db_message_insert_c_message($c_member_id_from, $c_member_id_to, $subject, $body);
     611    pne_cache_drop('db_message_count_c_message_not_is_read4c_member_to_id', $c_member_id_to);
    597612
    598613    do_common_send_message_syoukai_member_mail_send($c_member_id_to, $c_member_id_from);
     
    604619    //メッセージ
    605620    db_message_insert_c_message($c_member_id_from, $c_member_id_to, $subject, $body);
     621    pne_cache_drop('db_message_count_c_message_not_is_read4c_member_to_id', $c_member_id_to);
    606622
    607623    do_common_send_message_event_invite_mail_send($c_member_id_to, $c_member_id_from);
     
    613629    //メッセージ
    614630    db_message_insert_c_message($c_member_id_from, $c_member_id_to, $subject, $body);
     631    pne_cache_drop('db_message_count_c_message_not_is_read4c_member_to_id', $c_member_id_to);
    615632
    616633    do_common_send_message_event_message_mail_send($c_member_id_to, $c_member_id_from);
Note: See TracChangeset for help on using the changeset viewer.