Make defaultCache config consistent and simplify settings

Description

The defaultCache struct in the config is a little different since you don't get to choose the provider, but it is inconsistent and therefore a little confusing that the properties are not in a "properties" struct but are merged alongside the coldboxEnabled key which is not really a property for the provider, but more of a meta-flag that chooses what provider to create.

Deprecate the current method and move the actual provider properties into a properties struct like all other named caches:

To simplify this even further, I would recommend adding the coldboxEnabled flag to the init of the cacheFactory and default it to false. When ColdBox creates the cacheFactory it can pass in true. This removes the burden from the developer to mess with this flag since it is reasonable that CacheBox should be smart enough to figure out if ColdBox created it.

That would leave the "properties" struct as the ONLY key inside "defaultCache", but at least it is still consistent with the rest of the named caches. CacheBoxConfig.cfc will still check both places for the properties for now, and we can fully-remove the backwards compat code in a later release once people have had time to switch.

Assignee

Luis Majano

Reporter

Brad Wood

Labels

None

Components

Fix versions

Priority

Major
Configure