Merge pull request #177 from safing/fix/db-interface-permissions

Add permissions to database interfaces for improved performance
This commit is contained in:
Daniel 2020-10-14 11:35:05 +02:00 committed by GitHub
commit 247cecbfe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 5 deletions

View file

@ -48,6 +48,8 @@ var (
var (
cache = database.NewInterface(&database.Options{
Local: true,
Internal: true,
CacheSize: 2 ^ 8,
})
)

View file

@ -21,7 +21,10 @@ const (
)
var (
profileDB = database.NewInterface(nil)
profileDB = database.NewInterface(&database.Options{
Local: true,
Internal: true,
})
)
func makeScopedID(source, id string) string {

View file

@ -13,8 +13,11 @@ const (
)
var (
statusDB = database.NewInterface(nil)
hook *database.RegisteredHook
statusDB = database.NewInterface(&database.Options{
Local: true,
Internal: true,
})
hook *database.RegisteredHook
)
type statusHook struct {

View file

@ -20,8 +20,11 @@ const (
// working vars
var (
versionExport *versions
versionExportDB = database.NewInterface(nil)
versionExport *versions
versionExportDB = database.NewInterface(&database.Options{
Local: true,
Internal: true,
})
versionExportHook *database.RegisteredHook
)