mirror of
https://github.com/friendica/friendica
synced 2025-04-30 21:44:22 +02:00
Remove url caching, locking cleanup
This commit is contained in:
parent
c0aebd2bd4
commit
f09d9bc9cc
11 changed files with 55 additions and 73 deletions
|
@ -328,16 +328,8 @@ class Probe
|
|||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws \ImagickException
|
||||
*/
|
||||
public static function uri($uri, $network = '', $uid = -1, $cache = true)
|
||||
public static function uri($uri, $network = '', $uid = -1)
|
||||
{
|
||||
$cachekey = 'Probe::uri:' . $network . ':' . $uri;
|
||||
if ($cache) {
|
||||
$result = DI::cache()->get($cachekey);
|
||||
if (!is_null($result)) {
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
if ($uid == -1) {
|
||||
$uid = local_user();
|
||||
}
|
||||
|
@ -408,14 +400,7 @@ class Probe
|
|||
$data['hide'] = self::getHideStatus($data['url']);
|
||||
}
|
||||
|
||||
$data = self::rearrangeData($data);
|
||||
|
||||
// Only store into the cache if the value seems to be valid
|
||||
if (!in_array($data['network'], [Protocol::PHANTOM, Protocol::MAIL])) {
|
||||
DI::cache()->set($cachekey, $data, Duration::DAY);
|
||||
}
|
||||
|
||||
return $data;
|
||||
return self::rearrangeData($data);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue