public function getCategoryById($categoryId)
{
$cacheKey = "getCategoryById_" . $categoryId . ".gb";
$categoryObj = $this->gbReadCache($cacheKey);
if ($categoryObj === false) {
foreach ($this->categorys as $idx => $category) {
if ($category['id'] == $categoryId) {
$categoryObj = $category;
$this->gbWriteCache($cacheKey, $categoryObj);
break;
}
}
}
return $categoryObj;
}