Index: openacs-4/packages/xotcl-core/www/cache.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/www/cache.tcl,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/xotcl-core/www/cache.tcl 30 Mar 2019 19:32:23 -0000 1.8.2.2 +++ openacs-4/packages/xotcl-core/www/cache.tcl 17 Jan 2022 09:33:01 -0000 1.8.2.3 @@ -2,10 +2,11 @@ Cache Viewer } { {cache:optional 0} - {item:optional 0} - {flush:optional 0} + {item:token,optional 0} + {flush:boolean,optional 0} {filter ""} - {flushall:optional 0} + {flushall:boolean,optional 0} + {flushallcaches:optional,boolean 0} } -properties { title:onevalue context:onevalue @@ -21,6 +22,15 @@ # Expires: now ns_set update [ns_conn outputheaders] "Expires" "now" +if { $flushallcaches } { + foreach cache [ns_cache_names] { + ns_cache flush $cache + } + + ad_returnredirect [ns_conn url] + ad_script_abort +} + if { $flush ne "0" } { ns_cache flush $cache $flush ad_returnredirect [export_vars -base [ns_conn url] {cache}] @@ -47,6 +57,9 @@ TableWidget create t1 \ -actions [subst { Action new -label Refresh -url [ad_conn url] -tooltip "Reload this page" + Action new -label "Flush all" \ + -url [export_vars -base [ad_conn url] {{flushallcaches 1}}] \ + -tooltip "Flush all caches" }] \ -columns { AnchorField name -label "Name"