LuceeProvider overwrites cacheName config property with default

Description

Specifying a cacheName in properties has no effect. The cache always expects the default cache to exist which causes `lucee.commons.io.cache.exp.CacheException` error: `there is no default object cache defined, you need to define this default cache in the Lucee Administrator`

I believe this is due to the function `validateConfiguration`:

1 2 3 4 5 6 7 8 9 10 11 12 private function validateConfiguration(){ // Add in settings not discovered structAppend( variables.configuration, variables.DEFAULTS ); // Validate configuration values, if they don't exist, then default them to DEFAULTS for( var key in variables.DEFAULTS ){ if( NOT len( variables.configuration[ key ] ) ){ variables.configuration[ key ] = variables.DEFAULTS[ key ]; } } return this; }

I'm not sure why we are using structappend and looping over the struct, seems redundant. But if we keep structappend, the overwrite argument should be false:

 

1 structAppend( variables.configuration, variables.DEFAULTS, false );

I believe this same issue exists in the CFProvider component as well.

Status

Assignee

Luis Majano

Reporter

Sean Daniels

Labels

None

Fix versions

Priority

Major