Forum OpenACS Q&A: Re: Problems defining procs

Posted by Jeff Rogers on
The util_memoize procs are for exactly this purpose - run something once and return it quickly after that.

You can wrap it in a proc very easily too, for example:

proc get_values {} {
return [util_memoize get_values_internal 86400]

proc get_values_internal {} {
# do slow/heavy database access
return $values