coldfusion - cflock on application variables that rarely change -


we have series of variables loaded application scope change.

by change, mean strings phone numbers, or simple text values appear on website , may change once week or once month.

since reading these variables , because change, there requirement encapsulate these inside cflock ?

i think alot of coding overhead wrap these variables inside cflock template may contain upwards of 20 instances of these static variables.

any advice on appreciated

personally not need to. these variables constants.

however, need assess yourself. need answer question, 'what ramifications of these variables being read stale data?'

this means, if in example wrong phone number used on request disaster? if problem can live can make no changes. if there variables used in calculations or ones cause unacceptable problems if stale, need lock access these. in way can focus efforts on need , minimise additional work.

as aside if need lock variables pattern use store them inside cfc instance stored in application scope. way can handle locking in cfc , calling code remains simple.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -