Symfony Cache Component(3.1)不保存缓存

I'm using the new Symfony Cache Component. I generate my cache first with a command (Command/AppCacheGenerateCommand.php):

$cache = new FilesystemAdapter();         
foreach ($domains as $domain){
        if ($domain->getHost()){
            $output->writeln('Generate cache for domain: ' . $domain->getHost());
            $domainCache = $cache->getItem('domain.' . $domain->getHost());
            $domainCache->set($domain->getId());
            $cache->save($domainCache);
        }
    }

Then trying to get these cached elements in a onKernelRequest EventListener (EventListener/RequestListener.php)

$cache = new FileSystemAdapter();
    $domainCache = $cache->getItem('domain.' . $host);
    if (!$domainCache->isHit()){
        die;
    }

It's always dies here, not going further. Anyone can give me an explanation? (I've tried if the host not matching, but it does...)

I've figured out the answer:

First I had to add cache config in config.yml:

framework:
    cache:
        pools:
            my_cache_name:
                adapter: cache.adapter.filesystem
                default_lifetime: 0

Than instead of

$cache = new FilesystemAdapter(); 

I had to use the new service like:

$cache = $this->getContainer()->get('my_cache_name);

And it's started working! Hope it helps to others!