Index: openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 29 Dec 2006 16:58:10 -0000 1.2 +++ openacs-4/packages/xotcl-core/tcl/05-db-procs.tcl 2 Jan 2007 14:50:39 -0000 1.3 @@ -39,7 +39,7 @@ proc has_ltree {} { ns_cache eval xotcl_object_cache ::xo::has_ltree { - if {[catch {db_1row check_ltree "select * from pg_proc where proname = 'ltree_in'"}]} { + if {[db_string check_ltree "select count(*) from pg_proc where proname = 'ltree_in'"] == 0} { return 0 } return 1 Index: openacs-4/packages/xotcl-core/tcl/20-Ordered-Composite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/20-Ordered-Composite-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/xotcl-core/tcl/20-Ordered-Composite-procs.tcl 12 Dec 2006 09:32:15 -0000 1.7 +++ openacs-4/packages/xotcl-core/tcl/20-Ordered-Composite-procs.tcl 2 Jan 2007 14:50:39 -0000 1.8 @@ -63,7 +63,7 @@ #my log "--W destroying children [my set __children]" foreach c [my set __children] { $c destroy } } - #show_stack;my log "-- children murdered, now next, chlds=[my info children]" + #show_stack;my log "--W children murdered, now next, chlds=[my info children]" namespace eval [self] {namespace forget *} ;# for pre 1.4.0 versions next } Index: openacs-4/packages/xotcl-core/tcl/generic-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/generic-procs.tcl,v diff -u -r1.40 -r1.41 --- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 30 Dec 2006 12:03:46 -0000 1.40 +++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 2 Jan 2007 14:50:39 -0000 1.41 @@ -137,7 +137,8 @@ ) } if {[my cr_attributes] ne ""} { - set o [::xo::OrderedComposite new -volatile -contains [my cr_attributes]] + set o [::xo::OrderedComposite new -contains [my cr_attributes]] + $o destroy_on_cleanup foreach att [$o children] { $att instvar attribute_name datatype pretty_name sqltype db_1row create_att { @@ -258,7 +259,8 @@ my set superclass [[my info superclass] set object_type] } set sql_attribute_names [list] - set o [xo::OrderedComposite new -volatile -contains [my cr_attributes]] + set o [::xo::OrderedComposite new -contains [my cr_attributes]] + $o destroy_on_cleanup foreach att [$o children] { lappend sql_attribute_names [$att attribute_name] } Index: openacs-4/packages/xotcl-core/www/cache.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/www/cache.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xotcl-core/www/cache.adp 17 Aug 2006 01:27:54 -0000 1.1 +++ openacs-4/packages/xotcl-core/www/cache.adp 2 Jan 2007 14:50:39 -0000 1.2 @@ -2,7 +2,6 @@ @title;noquote@ @context;noquote@ -

@title@

Memory Caches

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.1 -r1.2 --- openacs-4/packages/xotcl-core/www/cache.tcl 17 Aug 2006 01:27:54 -0000 1.1 +++ openacs-4/packages/xotcl-core/www/cache.tcl 2 Jan 2007 14:50:39 -0000 1.2 @@ -1,9 +1,10 @@ ad_page_contract { Cache Viewer } { - {cache:optional 0} - {item:optional 0} - {flush:optional 0} + {cache:optional 0} + {item:optional 0} + {flush:optional 0} + {flushall:optional 0} } -properties { title:onevalue context:onevalue @@ -23,10 +24,18 @@ set title "Show Caches" set context [list "Cache Statistics"] -if { $flush ne 0 } { +if { $flush == 1 } { ns_cache flush $cache $flush ad_returnredirect "[ns_conn url]?cache=$cache" ad_script_abort +} + +if {$flushall == 1} { + foreach i [ns_cache names $cache] { + ns_cache flush $cache $i + } + ad_returnredirect "[ns_conn url]?cache=$cache" + ad_script_abort } if { $cache == 0 } { @@ -57,6 +66,8 @@ } else { set item_list [ns_cache names $cache] set item_count [llength $item_list] + append output "flush all items of $cache" + append output "

Items in cache $cache ($item_count) with size [ns_cache_size $cache]