Renamed function
This commit is contained in:
parent
26ac9a0063
commit
33cb241ed3
1 changed files with 2 additions and 8 deletions
|
@ -26,13 +26,7 @@ class SearchDirectory
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
self::discoverDirectory($search);
|
$data = Cache::get('SearchDirectory:' . $search);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static function discoverDirectory($search)
|
|
||||||
{
|
|
||||||
$data = Cache::get('discoverDirectory' . $search);
|
|
||||||
if (!is_null($data)) {
|
if (!is_null($data)) {
|
||||||
// Only search for the same item every 24 hours
|
// Only search for the same item every 24 hours
|
||||||
if (time() < $data + (60 * 60 * 24)) {
|
if (time() < $data + (60 * 60 * 24)) {
|
||||||
|
@ -86,6 +80,6 @@ class SearchDirectory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Cache::set('discoverDirectory' . $search, time(), Cache::DAY);
|
Cache::set('SearchDirectory:' . $search, time(), Cache::DAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue