for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Cache;
use Illuminate\Support\Facades\Cache;
class UserNotFoundCache
{
private const PREFIX = 'not_found_';
private const TTL = 86400;
/**
* @param string $usernameOrUuid
*
* @return bool
*/
public static function has(string $usernameOrUuid)
return Cache::has(self::PREFIX.\md5($usernameOrUuid));
}
* @param $usernameOrUuid
public static function add($usernameOrUuid)
return Cache::add(self::PREFIX.\md5($usernameOrUuid), 1, self::TTL);