I have a situation in which an app is deployed into Amazon Beanstalk,
Rackspace, and of course the local development environments. As it turns
out, each environment will use a different cache adapter (Rackspace and
Amazon will use memcached, and development will use filesystem).

My global.php file has the filesystem cache configured and as I deploy into
each environment there is a script that copies different cache.local.php
files in place for each environment.

My problem is that these files are being merged and I end up with a config
array with keys for both adapters. So I get errors like "The option
"cache_dir" does not have a matching setCacheDir setter method which must
be defined". These errors are correct because the Memcached adapter does
not have a setCacheDir() method; it's a leftover from the cache.global.php
which uses a Filesystem adapter.

The only solution that I can think of is having a single cache.global.php
and replacing that file entirely in each environment.

Are there any good practices related to this?

Thanks

Reply via email to