src/PeskyCMF/Db/Traits/CacheForDbSelects.php
public function selectOneAsDbRecordFromCache($columns, array $conditions, \Closure $configurator = null) {
        if ($this->cachingIsPossible()) {
            /** @var CmfDbTable|CacheForDbSelects $this */
            if (is_numeric($conditions) || is_int($conditions)) {
                $conditions = array(static::getPkColumnName() => $conditions);
            }
            static::addCacheOptionToConditionsAndOptions($conditions, true);
        }
        return $this->selectOneAsDbRecord($columns, $conditions, $configurator);
    }
public function selectOneAsDbRecordFromCache($columns, array $conditions, \Closure $configurator = null) {
        if ($this->cachingIsPossible()) {
            /** @var CmfDbTable|CacheForDbSelects $this */
            if (is_numeric($conditions) || is_int($conditions)) {
                $conditions = array(static::getPkColumnName() => $conditions);
            }
            static::addCacheOptionToConditionsAndOptions($conditions, true);
        }
        return $this->selectOneAsDbRecord($columns, $conditions, $configurator);
    }
Get 1 record from DB
@param string|array $columns
@param null|array|string|int $conditions -
array|string: conditions,
numeric|int: record's pk value, automatically converted to array($this->primaryKey => $where)
@return array
@throws \UnexpectedValueException
@throws \PeskyORM\Exception\OrmException
@throws \PeskyORM\Exception\InvalidDataException
@throws \PDOException
@throws \InvalidArgumentException
@throws \BadMethodCallException