Sync: Purge TemplateRepository cache before sync
This commit is contained in:
parent
6d3702a893
commit
a30a28a7a1
|
@ -19,6 +19,7 @@ use Icinga\Module\Director\Objects\SyncProperty;
|
||||||
use Icinga\Module\Director\Objects\SyncRule;
|
use Icinga\Module\Director\Objects\SyncRule;
|
||||||
use Icinga\Module\Director\Objects\SyncRun;
|
use Icinga\Module\Director\Objects\SyncRun;
|
||||||
use Icinga\Exception\IcingaException;
|
use Icinga\Exception\IcingaException;
|
||||||
|
use Icinga\Module\Director\Repository\IcingaTemplateRepository;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
|
|
||||||
class Sync
|
class Sync
|
||||||
|
@ -811,6 +812,8 @@ class Sync
|
||||||
protected function prepareCache()
|
protected function prepareCache()
|
||||||
{
|
{
|
||||||
PrefetchCache::initialize($this->db);
|
PrefetchCache::initialize($this->db);
|
||||||
|
IcingaTemplateRepository::clear();
|
||||||
|
|
||||||
$ruleObjectType = $this->rule->get('object_type');
|
$ruleObjectType = $this->rule->get('object_type');
|
||||||
|
|
||||||
$dummy = IcingaObject::createByType($ruleObjectType);
|
$dummy = IcingaObject::createByType($ruleObjectType);
|
||||||
|
|
Loading…
Reference in New Issue