diff --git a/logic/nodes.go b/logic/nodes.go index 34eebe2e..94e7199d 100644 --- a/logic/nodes.go +++ b/logic/nodes.go @@ -445,6 +445,9 @@ func GetRecordKey(id string, network string) (string, error) { func GetNodeByID(uuid string) (models.Node, error) { if servercfg.CacheEnabled() { + if len(getNodesFromCache()) == 0 { + _, _ = GetAllNodes() + } if node, ok := getNodeFromCache(uuid); ok { return node, nil } diff --git a/netclient/ncutils/netclientutils.go b/netclient/ncutils/netclientutils.go index 9f79892d..23fa9916 100644 --- a/netclient/ncutils/netclientutils.go +++ b/netclient/ncutils/netclientutils.go @@ -6,7 +6,7 @@ import ( ) // DEFAULT_GC_PERCENT - garbage collection percent -const DEFAULT_GC_PERCENT = 10 +const DEFAULT_GC_PERCENT = 100 // == OS PATH FUNCTIONS ==