public function addToCache($key, SiteConfig $config)
{
$key = strtolower($key);
if (substr($key, 0, 4) == 'www.') {
$key = substr($key, 4);
}
if ($config->cache_key) {
$key = $config->cache_key;
}
$this->cache[$key] = $config;
$this->logger->log('debug', 'Cached site config with key: {key}', array('key' => $key));
}