Skip to content

Instantly share code, notes, and snippets.

@kolyadin
Created September 20, 2013 08:32
Show Gist options
  • Save kolyadin/6634751 to your computer and use it in GitHub Desktop.
Save kolyadin/6634751 to your computer and use it in GitHub Desktop.
return $cache->set($cacheKey,'20s',array('manufacture','bike_model'))->call(function() use($mysqli,$resizer) {
$result = $mysqli->queryFile('/bank.sql/moto-front');
$bikes = array();
while ($row = $result->fetch_assoc())
{
$row['pic'] = $resizer->resize($row['pic'],'{"h":120}');
$bikes[] = $row;
}
return $bikes;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment