cakephp/cakephp — pull request #430 by foxycoder (2012-01-20 14:00:16+00:00)
Title: ViewCache uses Cache prefixes

Caching in Cake is awesome. We like how we can change the cache prefix for different configurations (e.g. language). The ViewCache however, does not follow in this: the cache prefix has no influence on where the cached views are stored. We feel this breaks expected behavior, hence this pull.

If a `Configure::read('Cache.prefix') is present, it is appended to the filename of the cached view in `TMP/cache/views`.

So, if I set

```php
Configure::write('Cache.prefix', 'us')
```

My cached homepage will end up in:

`tmp/views/us_home.php`

If I set a different cache prefix (e.g. for another language):

```php
Configure::write('Cache.prefix', 'fr')
```

My cached homepage for French visitors will end up in:

`tmp/views/fr_home.php`

If no cache prefix is set, it will end up in the default location:

`tmp/views/home.php`