mirror of
https://github.com/mudler/luet.git
synced 2025-09-12 13:26:16 +00:00
Initialize cache db if empty
This commit is contained in:
@@ -199,6 +199,10 @@ func (db *InMemoryDatabase) populateCaches(p Package) {
|
||||
|
||||
// Create extra cache between package -> []versions
|
||||
db.Lock()
|
||||
if db.cached == nil {
|
||||
db.cached = map[string]interface{}{}
|
||||
}
|
||||
|
||||
if _, ok := db.cached[p.GetFingerPrint()]; ok {
|
||||
db.Unlock()
|
||||
return
|
||||
|
Reference in New Issue
Block a user