Skip to content

Commit

Permalink
Resolved #41 set cache adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
dusta committed Sep 8, 2022
1 parent d179009 commit 5b42185
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Model\FileStorage\Drivers;

use Dframe\Config\Config;
use Dframe\FileStorage\Drivers\DatabaseDriverInterface;
use Exception;
use Model\Model;
Expand Down Expand Up @@ -83,8 +84,10 @@ public function cache($adapter, $originalPath, $cachePath, $mime, $stream = fals

$cache = $this->db->select('file_cache', '*', ['file_cache_path' => $cachePath])->result();
if (empty($cache['id']) and !empty($row['file_id'])) {
$cacheConfig = Config::load('fileStorage')->get('cache');
$data = [
'file_id' => $row['file_id'],
'file_cache_adapter' => $cacheConfig['adapter'],
'file_cache_path' => $cachePath,
'file_cache_mime' => $mime
];
Expand Down

0 comments on commit 5b42185

Please sign in to comment.