ColdFusion static key/value list?

Posted by richardtallent on Stack Overflow See other posts from Stack Overflow or by richardtallent
Published on 2010-04-19T19:23:17Z Indexed on 2010/04/19 20:03 UTC
Read the original article Hit count: 242

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

© Stack Overflow or respective owner

Related posts about coldfusion

Related posts about struct