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

[eluser]Eric Barnes[/eluser]
Personally just from the looks of it you are caching a lot of files for really no reason. I would instead use it like this:
Code:
function get_clubs($params)
{
  if ( ! $data = $this->cache->get('get_clubs_'.implode($params, '_'))
  {
    // Do queries and everything
    
    // Set all my return stuff to $data array
    $data = $rows;
    $this->cache->save('get_clubs_'.implode($params, '_'), $data, 600);
  }
  return $data;
}


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