Theme Service - adds settings without flushing setting cache

Description

Since the cb settings are stored in the prc, in the prepare ui request... its not hitting the db... it gets them from the PRC.

The issue with that is, Settings are set in the prc with

1 prc.cbSettings = settingService.getAllSettings( asStruct=true );

The issue with that is, getAllSettings() is cached

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 /** * Get all settings * @asStruct Indicator if we should return structs or array of objects * * @return struct or array of objects */ function getAllSettings( boolean asStruct=false ){ var cache = getSettingsCacheProvider(); var cacheKey = getSettingsCacheKey(); // retrieve all settings from cache var settings = cache.get( getSettingsCacheKey() ); // found in cache? if( isNull( settings ) ){ // not found, so query db var settings = list( sortOrder="name" ); // cache them for 5 days, usually app timeout cache.set( cacheKey, settings, 7200 ); } // convert to struct if a query, else return it. if( arguments.asStruct and isQuery( settings ) ){ var s = {}; for( var x=1; x lte settings.recordcount; x++ ){ s[ settings.name[ x ] ] = settings.value[ x ]; } return s; } return settings; }

Status

Assignee

Gavin Pickin

Reporter

Gavin Pickin

Labels

None

Components

Fix versions

Affects versions

3.5.0

Priority

Major