original_string: public static function purge_all($usewriter = false) {
          $factory = cache_factory::instance();
          $config = $factory->create_config_instance($usewriter);
          foreach ($config->get_all_stores() as $store) {
              self::purge_store($store['name'], $config);
          }
          foreach ($factory->get_adhoc_caches_in_use() as $cache) {
              $cache->purge();
          }
      }
code: public static function purge_all($usewriter = false) {
          $factory = cache_factory::instance();
          $config = $factory->create_config_instance($usewriter);
          foreach ($config->get_all_stores() as $store) {
              self::purge_store($store['name'], $config);
          }
          foreach ($factory->get_adhoc_caches_in_use() as $cache) {
              $cache->purge();
          }
      }
code_tokens: public static function purge_all ( $ usewriter = false ) { $ factory = cache_factory :: instance ( ) ; $ config = $ factory -> create_config_instance ( $ usewriter ) ; foreach ( $ config -> get_all_stores ( ) as $ store ) { self :: purge_store ( $ store [ 'name' ] , $ config ) ; } foreach ( $ factory -> get_adhoc_caches_in_use ( ) as $ cache ) { $ cache -> purge ( ) ; } }
docstring: Purge all of the cache stores of all of their data.
  
  Think twice before calling this method. It will purge **ALL** caches regardless of whether they have been used recently or
  anything. This will involve full setup of the cache + the purge operation. On a site using caching heavily this WILL be
  painful.
  
  @param bool $usewriter If set to true the cache_config_writer class is used. This class is special as it avoids
  it is still usable when caches have been disabled.
  Please use this option only if you really must. It's purpose is to allow the cache to be purged when it would be
  otherwise impossible.
docstring_tokens: Purge all of the cache stores of all of their data .