Welcome Guest, Not a member yet? Register   Sign In
Cache question
#1

[eluser]growknight[/eluser]
Hi
Is it good or bad solution for a medium traffic user updated network site?

Code:
// my model
    
    function get_clubs($params)
    {
        if (!empty($params['line']))
            $this->db->where('line', $params['line']);
        #some param
        $rows = $this->db->get('clubs')->result();
        
        foreach ($rows as $row)
        {
            $this->cache->model('clubs_m', 'get_club', array($row->club_id));
        }
    }
    
    function get_club($id)
    {
        $this->db->select('
            *, club_id AS ID
        ');
        #some joins...
        $this->db->where('club_id',$club_id);
        $this->db->get('clubs');
    }


Messages In This Thread
Cache question - by El Forum - 03-29-2011, 08:02 PM
Cache question - by El Forum - 03-29-2011, 08:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB