database: cache feature version upon lookup
This commit is contained in:
parent
1e4ded6f2b
commit
8f9779e232
@ -127,6 +127,11 @@ func (pgSQL *pgSQL) insertFeatureVersion(featureVersion database.FeatureVersion)
|
|||||||
if newOrExisting == "exi" {
|
if newOrExisting == "exi" {
|
||||||
// That featureVersion already exists, return its id.
|
// That featureVersion already exists, return its id.
|
||||||
tx.Commit()
|
tx.Commit()
|
||||||
|
|
||||||
|
if pgSQL.cache != nil {
|
||||||
|
pgSQL.cache.Add(cacheIndex, featureVersion.ID)
|
||||||
|
}
|
||||||
|
|
||||||
return featureVersion.ID, nil
|
return featureVersion.ID, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user