1
0
Fork 0
forked from mirror/pixelfed

Update AdminSettingsController, fix cache invalidation when updating rules

This commit is contained in:
Daniel Supernault 2022-08-26 01:55:51 -06:00
parent 243fcac7d5
commit fe6787f75e
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -75,6 +75,8 @@ trait AdminSettingsController
unset($json[$index]);
$json = json_encode(array_values($json));
ConfigCacheService::put('app.rules', $json);
Cache::forget('api:v1:instance-data:rules');
Cache::forget('api:v1:instance-data-response-v1');
return 200;
}
@ -173,7 +175,7 @@ trait AdminSettingsController
ConfigCacheService::put('app.rules', json_encode(array_values($json)));
}
Cache::forget('api:v1:instance-data:rules');
Cache::forget('api:v1:instance-data-response');
Cache::forget('api:v1:instance-data-response-v1');
}
if($request->filled('account_autofollow_usernames')) {