get( $cacheKey ); if ( !$objectData ) { $value = $mdb -> get( 'pp_shop_attributes_values', '*', [ 'id' => (int)$value_id ] ); $value['language'] = $mdb -> get( 'pp_shop_attributes_values_langs', [ 'lang_id', 'name' ], [ 'AND' => [ 'value_id' => (int)$value_id, 'lang_id' => $lang_id ] ] ); $cacheHandler -> set( $cacheKey, $value ); } else { return unserialize( $objectData ); } return $value; } public static function attribute_details( $attribute_id, $lang_id ) { global $mdb; if ( !$attribute = \Cache::fetch( 'attribute_details_' . $attribute_id . '_' . $lang_id ) ) { $attribute = $mdb -> get( 'pp_shop_attributes', '*', [ 'id' => (int)$attribute_id ] ); $attribute['language'] = $mdb -> get( 'pp_shop_attributes_langs', [ 'lang_id', 'name' ], [ 'AND' => [ 'attribute_id' => (int)$attribute_id, 'lang_id' => $lang_id ] ] ); \Cache::store( 'attribute_details_' . $attribute_id . '_' . $lang_id, $attribute ); } return $attribute; } }