mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 16:24:29 +00:00
Update InstanceService
This commit is contained in:
parent
7a9a06e0fd
commit
66f04bec25
1 changed files with 7 additions and 0 deletions
|
@ -7,6 +7,13 @@ use App\Instance;
|
||||||
|
|
||||||
class InstanceService
|
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()
|
public static function getBannedDomains()
|
||||||
{
|
{
|
||||||
return Cache::remember('instances:banned:domains', now()->addHours(12), function() {
|
return Cache::remember('instances:banned:domains', now()->addHours(12), function() {
|
||||||
|
|
Loading…
Reference in a new issue