ColdFusion static key/value list?
- by richardtallent
I have a database table that is a dictionary of defined terms -- key, value. I want to load the dictionary in the application scope from the database, and keep it there for performance (it doesn't change).
I gather this is probably some sort of "struct," but I'm extremely new to ColdFusion (helping out another team).
Then, I'd like to do some simple string replacement on some strings being output to the browser, looping through the defined terms and replacing the terms with some HTML to define the terms (a hover or a link, details to be worked out later, not important).
Can anyone point me in the right direction of:
How to define the stucture (if that is what I need for a key/value pair list)
How to query at the application start-up and reuse the list properly
The best way to do the string replacement