Update Cache, prepare for laravel 5.8
This commit is contained in:
parent
6bbef6ac4e
commit
4739c25fe0
15 changed files with 31 additions and 30 deletions
|
@ -23,7 +23,7 @@ class SearchController extends Controller
|
|||
return;
|
||||
}
|
||||
$hash = hash('sha256', $tag);
|
||||
$tokens = Cache::remember('api:search:tag:'.$hash, 5, function () use ($tag) {
|
||||
$tokens = Cache::remember('api:search:tag:'.$hash, now()->addMinutes(5), function () use ($tag) {
|
||||
$tokens = collect([]);
|
||||
if(Helpers::validateUrl($tag)) {
|
||||
$remote = Helpers::fetchFromUrl($tag);
|
||||
|
@ -85,6 +85,7 @@ class SearchController extends Controller
|
|||
'value' => $item->username,
|
||||
'tokens' => [$item->username],
|
||||
'name' => $item->name,
|
||||
'id' => $item->id
|
||||
];
|
||||
});
|
||||
$tokens->push($profiles);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue