mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
more caching
This commit is contained in:
parent
757211db74
commit
fbd91d33a4
1 changed files with 9 additions and 5 deletions
|
@ -37,11 +37,10 @@ class Prefinery
|
|||
if ($user)
|
||||
{
|
||||
unset($user['invitation_code']); // so we dont leak it
|
||||
}
|
||||
|
||||
if ($useApc && $apcEnabled)
|
||||
{
|
||||
apc_store('prefinery-user-'.$emailOrId, $user, 3600);
|
||||
if ($useApc && $apcEnabled)
|
||||
{
|
||||
apc_store('prefinery-user-'.$emailOrId, $user, 3600);
|
||||
}
|
||||
}
|
||||
|
||||
return $user;
|
||||
|
@ -114,6 +113,11 @@ class Prefinery
|
|||
{
|
||||
throw new PrefineryException('Update tester must be called with a tester id');
|
||||
}
|
||||
$apcEnabled = extension_loaded('apc') && ini_get('apc.enabled');
|
||||
if ($apcEnabled)
|
||||
{
|
||||
apc_delete('prefinery-user-'.$testerData['id']);
|
||||
}
|
||||
return static::put('/testers/' . $testerData['id'], ['tester' => array_diff_key(array_filter($testerData), ['id' => null])], false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue