Initializes the cache.  Reads the cache if available or creates one.
If there are problems, such as the cache location not being writeable the cache is disabled.
@return void
437252
public function initializeCache()
	{
		if ( $this->cacheLocation === null )
		{
			$this->cacheLocation = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'xbrl_taxonomy_cache' . DIRECTORY_SEPARATOR;
		}

		$this->cacheLocation = rtrim( $this->cacheLocation, '/' ) . '/';

		// $this->log()->info( "    Taxonomy cache location: " . $this->cacheLocation );

		// The cache location must exist or be creatable
		if ( ! file_exists( $this->cacheLocation ) )
		{
			// Attempt to create the directory
			if ( mkdir( $this->cacheLocation ) === false )
			{
				$this->useCache = false;
				$this->log()->err( "Failed to create the XBRL taxonomy cache. Caching will be disabled." );
				return;
			}
		}
	}
721669
private function init()
    {
        if (!is_dir($this->options['path'])) {
            if (mkdir($this->options['path'], 0755, true) && chmod($this->options['path'], 0755)) {
                return true;
            }
        }

        if (!is_writeable($this->options['path'])) {
            throw new CacheException('Cache Path: '.$this->options['path'].' is not writable');
        }

        return false;
    }
491681
public function init()
    {
        $this->db = \PHPDaemon\Clients\Mongo\Pool::getInstance($this->config->mongoclientname->value);
        $this->cache = \PHPDaemon\Clients\Memcache\Pool::getInstance($this->config->memcacheclientname->value);
        if (!isset($this->config->limitinstances)) {
            $this->log('missing \'limitInstances\' directive');
        }
    }
255391
public static void initialize()
    {
        if (InfinispanCache.get().exists(Field.IDCACHE)) {
            InfinispanCache.get().<Long, Field>getCache(Field.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, Field>getCache(Field.IDCACHE);
            InfinispanCache.get().<Long, Field>getCache(Field.IDCACHE).addListener(new CacheLogListener(Field.LOG));
        }
    }
148141
protected function _init() {
		parent::_init();
		$router = $this->_classes['router'];

		if ($this->_config['location']) {
			$location = $router::match($this->_config['location'], $this->_config['request']);
			$this->headers('Location', $location);
		}
	}
776855
protected function init()
    {
        if ($this->cache->get('options')) {
            $this->options = $this->cache->get('options');
        } else {
            $this->extractCategoriesFromModel($this->optionCategoryModel->newQuery()->get(['key'])->sortBy('key'));
            $this->extractOptionsFromModel(
                $this->optionModel->newQuery()->get(['id', 'category_key', 'key', 'value'])->sortBy('id')
            );
            $this->cache->forever('options', $this->options);
        }
    }
371899
public function initialize()
    {
        // Load data from a file file
        $this->storage->load();
        $data = $this->storage->getContent();

        // Set initial array signature
        $this->arraySignature->setData($data);
        $this->arrayCache->setData($data);

        // Run garbage collection
        $this->gc();
    }
866204
public static void initialize()
    {
        if (InfinispanCache.get().exists(SystemConfiguration.UUIDCACHE)) {
            InfinispanCache.get().<UUID, SystemConfiguration>getCache(SystemConfiguration.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, SystemConfiguration>getCache(SystemConfiguration.UUIDCACHE)
                            .addListener(new CacheLogListener(SystemConfiguration.LOG));
        }
        if (InfinispanCache.get().exists(SystemConfiguration.IDCACHE)) {
            InfinispanCache.get().<Long, SystemConfiguration>getCache(SystemConfiguration.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, SystemConfiguration>getCache(SystemConfiguration.IDCACHE)
                            .addListener(new CacheLogListener(SystemConfiguration.LOG));
        }
        if (InfinispanCache.get().exists(SystemConfiguration.NAMECACHE)) {
            InfinispanCache.get().<String, SystemConfiguration>getCache(SystemConfiguration.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, SystemConfiguration>getCache(SystemConfiguration.NAMECACHE)
                            .addListener(new CacheLogListener(SystemConfiguration.LOG));
        }

        SystemConfiguration.ENCRYPTOR = new StandardPBEStringEncryptor();
        SystemConfiguration.ENCRYPTOR.setConfig(SystemConfiguration.getPBEConfig());
    }
233606
public function initializeObject()
    {
        if ($this->cache->has($this->cacheKey)) {
            $this->parsedData = $this->cache->get($this->cacheKey);
        } else {
            $this->parsedData = $this->parseFiles($this->sourcePaths);
            $this->parsedData = $this->resolveAliases($this->parsedData, '');
            $this->cache->set($this->cacheKey, $this->parsedData);
        }
    }
647781
public function init()
    {
        $valid = null;

        if ($this->cache->has(self::CACHE_KEY)) {
            $cached = $this->cache->get(self::CACHE_KEY);
            $valid  = $cached && isset($cached['hosts']) && count($cached['hosts']);
        }


        if ($valid) {
            $this->map = $cached;
        } else {
            $this->build();
        }
    }
1310771
public static void initialize()
    {
        if (InfinispanCache.get().exists(Group.IDCACHE)) {
            InfinispanCache.get().<Long, Group>getCache(Group.IDCACHE).clear();
        } else {
            InfinispanCache.get().<Long, Group>getCache(Group.IDCACHE).addListener(new CacheLogListener(Group.LOG));
        }
        if (InfinispanCache.get().exists(Group.NAMECACHE)) {
            InfinispanCache.get().<String, Group>getCache(Group.NAMECACHE).clear();
        } else {
            InfinispanCache.get().<String, Group>getCache(Group.NAMECACHE).addListener(new CacheLogListener(Group.LOG));
        }
        if (InfinispanCache.get().exists(Group.UUIDCACHE)) {
            InfinispanCache.get().<UUID, Group>getCache(Group.UUIDCACHE).clear();
        } else {
            InfinispanCache.get().<UUID, Group>getCache(Group.UUIDCACHE).addListener(new CacheLogListener(Group.LOG));
        }
    }
847552
public function initialize()
    {
        $this->data = new stdClass();
        $this->data->holder = new stdClass();
        $this->data->holder->taxDocument = new stdClass();
    }
271941
public function initialize()
    {

        $this->id = null;
        $this->key = null;
        $this->name = null;
        $this->secret = null;
        $this->ltiVersion = null;
        $this->consumerName = null;
        $this->consumerVersion = null;
        $this->consumerGuid = null;
        $this->profile = null;
        $this->toolProxy = null;
        $this->settings = array();
        $this->protected = false;
        $this->enabled = false;
        $this->enableFrom = null;
        $this->enableUntil = null;
        $this->lastAccess = null;
        $this->idScope = ToolProvider::ID_SCOPE_ID_ONLY;
        $this->defaultEmail = '';
        $this->created = null;
        $this->updated = null;

    }
554933
public function init()
    {
        if ($this->getCache() === null) {
            $options = $this->getOptions();
            $this->setCache(Cache\StorageFactory::factory($options['cache']));
        }

        $this->isInit = true;
    }
1016215
protected function _init()
    {
        if (!isset($this->_ob) ||
            ($this->_ob->md5 != hash('md5', $this->key))) {
            switch ($this->cipher) {
            case 'cbc':
                $this->_ob = new Horde_Crypt_Blowfish_Php_Cbc($this->key);
                break;

            case 'ecb':
                $this->_ob = new Horde_Crypt_Blowfish_Php_Ecb($this->key);
                break;
            }
        }
    }
872227
protected function initialize()
    {
        $this->context = $this->environment->getContext();

        if ($this->hasFrozenCacheInProduction()) {
            $this->classReflectionData = $this->reflectionDataRuntimeCache->get('__classNames');
            $this->annotatedClasses = $this->reflectionDataRuntimeCache->get('__annotatedClasses');
            $this->loadFromClassSchemaRuntimeCache = true;
        } else {
            $this->loadClassReflectionCompiletimeCache();
        }

        $this->annotationReader = new AnnotationReader();
        foreach ($this->settings['ignoredTags'] as $tagName => $ignoreFlag) {
            if ($ignoreFlag === true) {
                AnnotationReader::addGlobalIgnoredName($tagName);
            }
        }

        $this->initialized = true;
    }
157999
protected function load()
    {
        if ($this->cache->contains($this->getCacheKey())) {
            $this->map = $this->cache->fetch($this->getCacheKey());
        } else {
            $this->generateMap();
        }
    }