Closed chrislam closed 5 years ago
@chrislam I don't know if you could use the same system as other Craft config files do but I currently use 'cache' => (bool)getenv('USECACHE'),
with USECACHE=1
. Works fine for me.
Yep, all plugin config files support multi-environment configuration.
return [
'*' => [
// all your endpoint configs
],
'production' => [
'defaults' => [
'cache' => true,
],
]
];
Or as @EternalBlack pointed out, you could just refer to an environment variable with getenv()
.
Cool, thanks for the response :)
As per the description, am I able to set
cache => false
for dev andcache => true
for other environments? If so, so I use the same system as other Craft config files to do this?