public function setCacheFactory($cacheFactory)
{
if ($cacheFactory != $this->cacheFactory || !$cacheFactory instanceof FactoryInterface) {
if (is_string($cacheFactory)) {
$cacheFactory = new $cacheFactory();
}
if (!$cacheFactory || !$cacheFactory instanceof FactoryInterface) {
throw new InvalidArgument('O cacheFactory deve implementar PhpSigep\\FactoryInterface.');
}
$this->cacheFactory = $cacheFactory;
}
}