zendframework/zf1 — pull request #382 by OndraM (2014-06-17 11:13:32+00:00)
Title: Properly cleaning of File cache files in cleaning mode ALL

If in Zend_Cache_Backend_File the ```clean()``` is called with ```Zend_Cache::CLEANING_MODE_ALL```, it should delete even orphaned metadata cache files. But in some cases (cache id is in alphabet after "i") or on some filesystems, this leads to applying the clean first on even non-orphaned internal metadata files (because ```zend_cache---internal-metadatas---xxx``` comes before ```zend_cache---xxx```). So the backend tries to treat the metadata file as normal cache file, but this obviously fails, as the ```_delMetadatas()``` won't work on metadata files.

The behavior of ```clean()``` is not changed, because even the current broken version removes all files in the end, but it currently returns false.

This PR also adds test for described cases (and even fixes never properly working test for hasheddirectory structure mode).