Add support for filesystem caching, closes #993

This commit is contained in:
Dane Everitt 2018-03-01 18:46:59 -06:00
parent ab2973c4d1
commit 838b9a9093
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 5 additions and 11 deletions

View file

@ -48,7 +48,7 @@ class DownloadController extends Controller
$token = str_random(40);
$node = $server->getRelation('node');
$this->cache->tags(['Server:Downloads'])->put($token, ['server' => $server->uuid, 'path' => $file], 5);
$this->cache->put('Server:Downloads:' . $token, ['server' => $server->uuid, 'path' => $file], 5);
return redirect(sprintf('%s://%s:%s/v1/server/file/download/%s', $node->scheme, $node->fqdn, $node->daemonListen, $token));
}