/** * @param string $table * @param int $cacheTtl * @param bool $flushCache * @return array */ protected function _getColumnsByTableFromDb($table, $cacheTtl = self::CACHE_NO, $flushCache = false) { Assert($table)->string()->notEmpty(); $callback = function () use($table) { return $this->_connection->getColumns(true, $table); }; $cacheKey = '/column_schema/' . $table; if ($flushCache === true) { $this->clearCache($cacheKey); } return $this->_cacheData($cacheKey, $callback, $cacheTtl); }