Update AccountService.php

pull/6481/head
Shlee 6 days ago committed by GitHub
parent e33026a9e5
commit 34e6db1ec1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -82,6 +82,26 @@ class AccountService
return Cache::forget(self::CACHE_KEY.$id);
}
public static function getStatus($id)
{
$key = 'pf:services:account:status:'.$id;
return Cache::remember($key, 900, function () use ($id) {
$profile = Profile::find($id);
if (! $profile) {
return 'not-found';
}
return $profile->status ?? 'active';
});
}
public static function clearStatusCache($id)
{
return Cache::forget('pf:services:account:status:'.$id);
}
public static function settings($id)
{
return Cache::remember('profile:compose:settings:'.$id, 604800, function () use ($id) {

Loading…
Cancel
Save