1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

Avoid overwriting existing cache entry

also fix RoutesNoExport.
This commit is contained in:
Benedikt Rudolph 2019-02-28 13:25:47 +01:00
parent 75380807de
commit bab2be0957

View file

@ -235,10 +235,10 @@ func Protocols() (Parsed, bool) {
metaProtocol["protocols"].(Parsed)["bird_protocol"].(Parsed)[birdProtocol].(Parsed)[protocol] = &parsed
}
toCache(GetCacheKey("Protocols"), metaProtocol)
toCache(GetCacheKey("metaProtocol"), metaProtocol)
}
res, from_cache := RunAndParse(GetCacheKey("Protocols"), "protocols all", parseProtocols, createMetaCache)
res, from_cache := RunAndParse(GetCacheKey("metaProtocol"), "protocols all", parseProtocols, createMetaCache)
return res, from_cache
}
@ -248,7 +248,7 @@ func ProtocolsBgp() (Parsed, bool) {
return protocols, from_cache
}
protocolsMeta, _ := fromCache(GetCacheKey("Protocols")) //TODO geht das einfach so?
protocolsMeta, _ := fromCache(GetCacheKey("metaProtocol"))
metaProtocol := protocolsMeta["protocols"].(Parsed)
bgpProtocols := Parsed{}