diff --git a/app/Http/Controllers/DownloadController.php b/app/Http/Controllers/DownloadController.php index e84ada1..3f1f394 100644 --- a/app/Http/Controllers/DownloadController.php +++ b/app/Http/Controllers/DownloadController.php @@ -23,7 +23,7 @@ public function get(Request $request, Upload $upload) } if (!$request->user() || $request->user()->id !== $upload->user_id) { - $cacheKey = sprintf('cached_view:%s:%s', $request->ip(), $upload->hash); + $cacheKey = sprintf('cached_view:%s:%s', $request->ip(), $upload->name); if (!Cache::has($cacheKey)) { Cache::put($cacheKey, 1, 60); DB::table('uploads')->where('id', $upload->id)->increment('views');