<commit_before><?php
/**
 * Table Definition for reply
 */
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';

class Mention extends Managed_DataObject
{
    ###START_AUTOCODE
    /* the code below is auto generated do not remove the above tag */

    public $__table = 'mention';                           // table name
    public $notice_id;                       // int(4)  primary_key not_null
    public $profile_id;                      // int(4)  primary_key not_null
    public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP

    /* Static get */
    function staticGet($k,$v=null)
    { return Memcached_DataObject::staticGet('Mention',$k,$v); }

    /* the code above is auto generated do not remove the tag below */
    ###END_AUTOCODE

    public static function schemaDef()
    {
        return array(
            'fields' => array(
                'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice that has the mention'),
                'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'profile mentioned'),
                'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
            ),
            'primary key' => array('notice_id', 'profile_id'),
            'foreign keys' => array(
                'mention_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
                'mention_profile_id_fkey' => array('profile', array('profile_id' => 'id')),
            ),
            'indexes' => array(
                'mention_notice_id_idx' => array('notice_id'),
                'mention_profile_id_idx' => array('profile_id'),
                'mention_profile_id_modified_notice_id_idx' => array('profile_id', 'modified', 'notice_id')
            ),
        );
    }    

	function pkeyGet($kv)
	{
		return Memcached_DataObject::pkeyGet('Mention',$kv);   
	}
	
    /**
     * Wrapper for record insertion to update related caches
     */
    function insert()
    {
        $result = parent::insert();

        if ($result) {
            self::blow('reply:stream:%d', $this->profile_id);
        }

        return $result;
    }

    function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
    {
        $stream = new MentionNoticeStream($user_id);

        return $stream->getNotices($offset, $limit, $since_id, $max_id);
    }
}<commit_msg>missed a cache key from before reply->mention switch<commit_after><?php
/**
 * Table Definition for mention
 */
require_once INSTALLDIR.'/classes/Memcached_DataObject.php';

class Mention extends Managed_DataObject
{
    ###START_AUTOCODE
    /* the code below is auto generated do not remove the above tag */

    public $__table = 'mention';                           // table name
    public $notice_id;                       // int(4)  primary_key not_null
    public $profile_id;                      // int(4)  primary_key not_null
    public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP

    /* Static get */
    function staticGet($k,$v=null)
    { return Memcached_DataObject::staticGet('Mention',$k,$v); }

    /* the code above is auto generated do not remove the tag below */
    ###END_AUTOCODE

    public static function schemaDef()
    {
        return array(
            'fields' => array(
                'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice that has the mention'),
                'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'profile mentioned'),
                'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
            ),
            'primary key' => array('notice_id', 'profile_id'),
            'foreign keys' => array(
                'mention_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
                'mention_profile_id_fkey' => array('profile', array('profile_id' => 'id')),
            ),
            'indexes' => array(
                'mention_notice_id_idx' => array('notice_id'),
                'mention_profile_id_idx' => array('profile_id'),
                'mention_profile_id_modified_notice_id_idx' => array('profile_id', 'modified', 'notice_id')
            ),
        );
    }    

	function pkeyGet($kv)
	{
		return Memcached_DataObject::pkeyGet('Mention',$kv);   
	}
	
    /**
     * Wrapper for record insertion to update related caches
     */
    function insert()
    {
        $result = parent::insert();

        if ($result) {
            self::blow('mention:stream:%d', $this->profile_id);
        }

        return $result;
    }

    function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0)
    {
        $stream = new MentionNoticeStream($user_id);

        return $stream->getNotices($offset, $limit, $since_id, $max_id);
    }
}
{'fraction_non_alphanumeric': 0.14162832566513303, 'fraction_numerical': 0.002000400080016003, 'mean_word_length': 2.3046926635822866, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 54, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '466911', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1441, 'n_words': 337}