Piwik\Archive::initializeArchiveIdCache PHP Method

initializeArchiveIdCache() private method

It is necessary that each archive ID caching function call this method for each unique 'done' flag it encounters, since the getArchiveIds function determines whether archiving should be launched based on whether $this->idarchives has a an entry for a specific 'done' flag. If this function is not called, then periods with no visits will not add entries to the cache. If the archive is used again, SQL will be executed to try and find the archive IDs even though we know there are none.
private initializeArchiveIdCache ( string $doneFlag )
$doneFlag string
    private function initializeArchiveIdCache($doneFlag)
    {
        if (!isset($this->idarchives[$doneFlag])) {
            $this->idarchives[$doneFlag] = array();
        }
    }