Index: openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl,v diff -u -r1.10.2.20 -r1.10.2.21 --- openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl 12 Nov 2021 08:59:03 -0000 1.10.2.20 +++ openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl 18 Nov 2021 19:56:14 -0000 1.10.2.21 @@ -686,8 +686,27 @@ } } +namespace eval ::acs { + ad_proc -private try_cache {cache key cmd} { + Function to support caching during bootstrap. When the + provided cache exists, then use it for caching, otherwise + perform uncalled call. This function is made intentionally + private, since this should only be required during + bootstraping. It does not make sense to wrap arbitrary caching + calls with this function. + } { + if {[info commands $cache] ne ""} { + return [uplevel [list $cache eval $key $cmd]] + } else { + ns_log warning "no cache $cache: need direct call $key $cmd" + return [uplevel $cmd] + } + } +} + + # Local variables: # mode: tcl # tcl-indent-level: 4