Skip to content

Commit b9a254d

Browse files
andrehankeandrehanke
authored andcommitted
enhance: removed cache reference from .env
1 parent 1194120 commit b9a254d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Database/Connection.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ private function compile(Builder $builder)
147147
}
148148
}
149149

150-
$cache_tables = env('SYBASE_CACHE_TABLES');
151-
$cache = ! key_exists('cache_tables', $builder->connection->config) || $builder->connection->config['cache_tables'];
150+
$cache = $builder->connection->config['cache_tables'] || key_exists('cache_tables', $builder->connection->config);
152151

153152
$types = [];
154153

@@ -165,7 +164,7 @@ private function compile(Builder $builder)
165164
$tables = $alias['table'];
166165
}
167166

168-
if ($cache_tables && $cache) {
167+
if ($cache) {
169168
$aux = Cache::remember('sybase_columns/'.$tables.'.columns_info', env('SYBASE_CACHE_TABLES_TIME') ?? 3600, function () use ($tables) {
170169
$queryString = $this->queryString($tables);
171170
$queryRes = $this->getPdo()->query($queryString);

0 commit comments

Comments
 (0)