summaryrefslogtreecommitdiff
path: root/internal/db/bundb/domain.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-07-24 09:41:43 +0100
committerLibravatar GitHub <noreply@github.com>2024-07-24 10:41:43 +0200
commit63fc9b6c3e8a03010b662a4acad0eb6f04a11f04 (patch)
treef4bf28f78333365cbe9eeda19de4de566e475584 /internal/db/bundb/domain.go
parent[feature] Allow user to set "bot" flag; show bot icon on profile (#3135) (diff)
downloadgotosocial-63fc9b6c3e8a03010b662a4acad0eb6f04a11f04.tar.xz
[chore] renames the `GTS` caches to `DB` caches (#3127)
* renames the `GTS` caches to `DB` caches, as it better references what they are * change remaining Caches.GTS uses to Caches.DB
Diffstat (limited to 'internal/db/bundb/domain.go')
-rw-r--r--internal/db/bundb/domain.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/db/bundb/domain.go b/internal/db/bundb/domain.go
index 1254d79c8..0d2a13b34 100644
--- a/internal/db/bundb/domain.go
+++ b/internal/db/bundb/domain.go
@@ -51,7 +51,7 @@ func (d *domainDB) CreateDomainAllow(ctx context.Context, allow *gtsmodel.Domain
}
// Clear the domain allow cache (for later reload)
- d.state.Caches.GTS.DomainAllow.Clear()
+ d.state.Caches.DB.DomainAllow.Clear()
return nil
}
@@ -126,7 +126,7 @@ func (d *domainDB) DeleteDomainAllow(ctx context.Context, domain string) error {
}
// Clear the domain allow cache (for later reload)
- d.state.Caches.GTS.DomainAllow.Clear()
+ d.state.Caches.DB.DomainAllow.Clear()
return nil
}
@@ -147,7 +147,7 @@ func (d *domainDB) CreateDomainBlock(ctx context.Context, block *gtsmodel.Domain
}
// Clear the domain block cache (for later reload)
- d.state.Caches.GTS.DomainBlock.Clear()
+ d.state.Caches.DB.DomainBlock.Clear()
return nil
}
@@ -222,7 +222,7 @@ func (d *domainDB) DeleteDomainBlock(ctx context.Context, domain string) error {
}
// Clear the domain block cache (for later reload)
- d.state.Caches.GTS.DomainBlock.Clear()
+ d.state.Caches.DB.DomainBlock.Clear()
return nil
}
@@ -241,7 +241,7 @@ func (d *domainDB) IsDomainBlocked(ctx context.Context, domain string) (bool, er
}
// Check the cache for an explicit domain allow (hydrating the cache with callback if necessary).
- explicitAllow, err := d.state.Caches.GTS.DomainAllow.Matches(domain, func() ([]string, error) {
+ explicitAllow, err := d.state.Caches.DB.DomainAllow.Matches(domain, func() ([]string, error) {
var domains []string
// Scan list of all explicitly allowed domains from DB
@@ -259,7 +259,7 @@ func (d *domainDB) IsDomainBlocked(ctx context.Context, domain string) (bool, er
}
// Check the cache for a domain block (hydrating the cache with callback if necessary)
- explicitBlock, err := d.state.Caches.GTS.DomainBlock.Matches(domain, func() ([]string, error) {
+ explicitBlock, err := d.state.Caches.DB.DomainBlock.Matches(domain, func() ([]string, error) {
var domains []string
// Scan list of all blocked domains from DB