mirror of https://github.com/Icinga/icinga2.git
IcingaDB: Cache generated object hash
This commit is contained in:
parent
07e60c1961
commit
85c77bd878
|
@ -62,7 +62,13 @@ String IcingaDB::FormatCommandLine(const Value& commandLine)
|
||||||
|
|
||||||
String IcingaDB::GetObjectIdentifier(const ConfigObject::Ptr& object)
|
String IcingaDB::GetObjectIdentifier(const ConfigObject::Ptr& object)
|
||||||
{
|
{
|
||||||
return HashValue(new Array({m_EnvironmentId, object->GetName()}));
|
String identifier = object->GetIcingadbIdentifier();
|
||||||
|
if (identifier.IsEmpty()) {
|
||||||
|
identifier = HashValue(new Array({m_EnvironmentId, object->GetName()}));
|
||||||
|
object->SetIcingadbIdentifier(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
return identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue