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.25 -r1.10.2.26 --- openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl 8 Jan 2022 15:37:54 -0000 1.10.2.25 +++ openacs-4/packages/acs-tcl/tcl/acs-cache-procs.tcl 11 Jan 2022 12:37:43 -0000 1.10.2.26 @@ -432,6 +432,7 @@ :public method eval { {-key:required} {-no_cache} + {-no_empty:switch false} {-from_cache_indicator} cmd } { @@ -442,6 +443,9 @@ # @param key key for caching, should start with package-key # and a dot to avoid name clashes # @param cmd command to be executed. + # @param no_empty don't cache empty values. This flag is + # deprecated, one should use the no_cache flag + # instead. # @param no_cache list of returned values that should not be cached # @param from_cache_indicator variable name to indicate whether # the returned value was from cache or not @@ -458,6 +462,10 @@ #ns_log notice "### call cmd <$cmd>" set from_cache 0 set value [:uplevel $cmd] + if {$no_empty} { + ad_log warning "no_empty flag is deprecated and will be dropped in the future." + lappend no_cache "" + } if {[info exists no_cache] && $value in $no_cache} { #ns_log notice "### cache eval $key returns <$value> without caching" return $value