Sync: Purge TemplateRepository cache before sync

This commit is contained in:
Markus Frosch 2019-04-17 10:47:43 +02:00
parent 6d3702a893
commit a30a28a7a1
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ use Icinga\Module\Director\Objects\SyncProperty;
use Icinga\Module\Director\Objects\SyncRule;
use Icinga\Module\Director\Objects\SyncRun;
use Icinga\Exception\IcingaException;
use Icinga\Module\Director\Repository\IcingaTemplateRepository;
use InvalidArgumentException;
class Sync
@ -811,6 +812,8 @@ class Sync
protected function prepareCache()
{
PrefetchCache::initialize($this->db);
IcingaTemplateRepository::clear();
$ruleObjectType = $this->rule->get('object_type');
$dummy = IcingaObject::createByType($ruleObjectType);