1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Update InstanceService

This commit is contained in:
Daniel Supernault 2021-10-19 19:51:14 -06:00
parent 7a9a06e0fd
commit 66f04bec25
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -7,6 +7,13 @@ use App\Instance;
class InstanceService
{
public static function getByDomain($domain)
{
return Cache::remember('pf:services:instance:by_domain:'.$domain, 3600, function() use($domain) {
return Instance::whereDomain($domain)->first();
});
}
public static function getBannedDomains()
{
return Cache::remember('instances:banned:domains', now()->addHours(12), function() {