```php
<?php

// V1

    /**
     * {@inheritDoc}
     */
    public function remove($filter, $path = null)
    {
        if (null === $path) {
            // TODO: this logic has to be refactored.
            list($rootCachePath) = explode($filter, $this->getFilePath('whateverpath', $filter));

            $filterCachePath = $rootCachePath.$filter;
            if (is_dir($filterCachePath)) {
                $this->filesystem->remove($filterCachePath);
            }

            return;
        }

        $this->basePath = $this->getRequest()->getBaseUrl();
        $filePath = $this->getFilePath($path, $filter);

        $this->filesystem->remove($filePath);
    }

// V2

    /**
     * {@inheritDoc}
     */
    public function remove(array $paths, array $filters)
    {
        if (empty($paths) && empty($filters)) {
            // or exception ??
            return;
        }

        // TODO: this logic has to be refactored.
        list($rootCachePath) = explode(current($filters), $this->getFilePath('whateverpath', current($filters)));

        if (empty($paths)) {

            $filtersCachePaths = array();
            foreach ($filters as $filter) {
                $filterCachePath = $rootCachePath.$filter;
                if (is_dir($filterCachePath)) {
                    $filtersCachePaths[] = $filterCachePath;
                }
            }

            $this->filesystem->remove($filtersCachePaths);

            return;
        }

        foreach ($paths as $path) {
            foreach ($filters as $filter) {
                $this->filesystem->remove($this->getFilePath($path, $filter));
            }
        }
    }

```