From 6e8e9a2d5eb6a46d310e68fed2ff28670d89e17d Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 24 May 2020 21:59:09 -0600 Subject: [PATCH] Update ProfileController, remove actor object caching --- app/Http/Controllers/ProfileController.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 0754efbf6..7d0b4405c 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -171,15 +171,11 @@ class ProfileController extends Controller { abort_if(!config('federation.activitypub.enabled'), 404); abort_if($user->domain, 404); - $key = 'profile:ap:' . $user->id; - $ttl = now()->addMinutes(15); - return Cache::remember($key, $ttl, function() use($user) { - $fractal = new Fractal\Manager(); - $resource = new Fractal\Resource\Item($user, new ProfileTransformer); - $res = $fractal->createData($resource)->toArray(); - return response(json_encode($res['data']))->header('Content-Type', 'application/activity+json'); - }); + $fractal = new Fractal\Manager(); + $resource = new Fractal\Resource\Item($user, new ProfileTransformer); + $res = $fractal->createData($resource)->toArray(); + return response(json_encode($res['data']))->header('Content-Type', 'application/activity+json'); } public function showAtomFeed(Request $request, $user)