app/Services/LikeService.php
use App\Util\ActivityPub\Helpers;use Illuminate\Support\Facades\Cache; class LikeService { const CACHE_KEY = 'pf:services:likes:ids:'; public static function add($profileId, $statusId) { $key = self::CACHE_KEY . $profileId . ':' . $statusId; $ttl = now()->addHours(2); return Cache::put($key, true, $ttl); } public static function remove($profileId, $statusId) { $key = self::CACHE_KEY . $profileId . ':' . $statusId; $ttl = now()->addHours(2); return Cache::put($key, false, $ttl); } //}