Using a Cache Key Prefix


You have multiple applications using the same cache and want to differentiate keys between them.


Set an application specific cache prefix.

Edit your app/config/cache.php file and change the prefix setting.

// app/config/cache.php
return array(
    'prefix' => 'myprefix',


Every item retrieved or stored in the cache will automatically have this prefix.

Note the File and Array cache drivers do not use the prefix. This is because those drivers are already considered application specific.

comments powered by Disqus