Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.76 -r1.77 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 7 Nov 2008 16:25:35 -0000 1.76 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 11 Nov 2008 12:25:35 -0000 1.77 @@ -327,7 +327,18 @@ append key "-$c [my set __caller_parameters]" if {[$c localized]} {append key -[my locale]} if {[$c personalized]} {append key -[::xo::cc user_id]} - return [ns_cache eval xowiki_cache $key next] + set HTML [ns_cache eval xowiki_cache $key next] + if {[catch {set data [ns_cache get xowiki_cache $key-data]}]} { + my cache_includelet_data $key-data + } else { + #my msg "eval $data" + eval $data + } + return $HTML + } -instproc cache_includelet_data {key} { + #my msg "data=[next]" + set data [next] + if {$data ne ""} {ns_cache set xowiki_cache $key $data} } } namespace eval ::xowiki::includelet { @@ -1551,6 +1562,12 @@ toc instproc current {} {return [my set navigation(current)]} toc instproc position {} {return [my set navigation(position)]} toc instproc page_name {p} {return [my set page_name($p)]} + toc instproc cache_includelet_data {key} { + append data \ + [list my array set navigation [my array get navigation]] \n \ + [list my array set page_name [my array get page_name]] \n + return $data + } toc proc anchor {name} { # try to strip the language prefix from the name Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -r1.147 -r1.148 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 5 Nov 2008 12:26:49 -0000 1.147 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 11 Nov 2008 12:25:35 -0000 1.148 @@ -1126,15 +1126,20 @@ } $object_type delete -item_id $item_id my flush_references -item_id $item_id -name $name - my flush_page_fragment_cache + my flush_page_fragment_cache -scope agg } else { my log "--D nothing to delete!" } my returnredirect [my query_parameter "return_url" [$id package_url]] } - Package instproc flush_page_fragment_cache {} { - foreach entry [ns_cache names xowiki_cache PF-[my id]-agg-*] { + Package instproc flush_page_fragment_cache {{-scope agg}} { + switch -- $socpe { + agg {set key PF-[my id]-agg-*} + all {set key PF-[my id]-*} + default {error "unknown cope for flushing page fragment cache"} + } + foreach entry [ns_cache names xowiki_cache $key] { ns_log notice "::xo::clusterwide ns_cache flush xowiki_cache $entry" ::xo::clusterwide ns_cache flush xowiki_cache $entry }