Forum OpenACS Q&A: Response to Coding: db vs tcl: Fastest Random Loop

Collapse
Posted by MaineBob OConnor on

Hi Jerry,

My requirement is for the order to be different "instantly" so that if the user refreshes or comes back to this page in 5 minutes, she sees the differently ordered items. What I was hoping for is something like:

set final_text [random [list $txt1 $txt2 $txt3 $txt4 $txt5 $txt6 $txt7]]
with the txt1, txt2... sets in the tcl code.

Also, does it make a difference in speed and caching if the text is in the /tcl area vs the /www area? Do I understand correctly that stuff in /tcl is loaded into memory once at aolserver startup?

-Bob