public function toCache($cacheKey, $value, array $references = array())
    {

        // add the value to the cache
        $this->cache[$cacheKey] = $value;

        // also register the references if given
        foreach ($references as $from => $to) {
            $this->references[$from] = $to;
        }
    }