title: Symfony app/console cache:clear --env=prod and cache (APC, Memcached, etc)?
body: <p>I'm using a Memcached server (along with memcache PHP extension) to cache validator metadata and Doctrine metatada/result/query cache driver.</p>
  
  <p>Everything works as expected and is <em>fast</em> compared to filesystem cache.</p>
  
  <p>My question is, does the command:</p>
  
  <pre><code>php app/console cache:clear --env=prod --no-debug
  </code></pre>
  
  <p>automatically clear all types of cache (including memcache)?</p>
  
  <p>After running this command and checking the server stats, items count is always the same as well as cache occupation:</p>
  
  <p><img src="https://i.stack.imgur.com/gO7ad.png" alt="enter image description here"></p>
  
  <p>My configuration, where %prod_cache% parameter is actually the string <code>memcache</code>:</p>
  
  <pre><code># Framework Configuration
  framework:
      validation:
          cache: %prod_cache% # Matches validator cache service
  
  # Doctrine Configuration
  doctrine:
      orm:
          metadata_cache_driver:
              type: service
              id: cache_%prod_cache%
          result_cache_driver:
              type: service
              id: cache_%prod_cache%
          query_cache_driver:
              type: service
              id: cache_%prod_cache%
  
  # DoctrineCacheBundle Configuration
  doctrine_cache:
      providers:
          memcache:
              type: memcache
              alias: cache_memcache
  
  # Services
  services:
      validator.mapping.cache.memcache: # Validator cache service
          class: Symfony\Component\Validator\Mapping\Cache\DoctrineCache
          arguments: [@cache_memcache]
  </code></pre>