Index: openacs-4/packages/acs-tcl/tcl/20-memoize-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/20-memoize-init.tcl,v
diff -u -r1.1 -r1.1.14.1
--- openacs-4/packages/acs-tcl/tcl/20-memoize-init.tcl 12 Apr 2001 16:58:18 -0000 1.1
+++ openacs-4/packages/acs-tcl/tcl/20-memoize-init.tcl 6 Feb 2006 16:12:24 -0000 1.1.14.1
@@ -6,3 +6,33 @@
ns_cache create util_memoize -size \
[ad_parameter -package_id [ad_acs_kernel_id] MaxSize memoize 200000]
+
+
+# We construct the body of util_memoize_flush differently depending
+# on whether clustering is enabled and what command is available for
+# cluster-wide flushing.
+
+if {[llength [info commands ncf.send]] > 0} {
+ set flush_body {
+ ncf.send util_memoize $script
+ }
+} elseif {[llength [info commands server_cluster_httpget_from_peers]] > 0} {
+ set flush_body {
+ server_cluster_httpget_from_peers "/SYSTEM/flush-memoized-statement.tcl?statement=[ns_urlencode $script]"
+ }
+} else {
+ set flush_body {}
+}
+
+append flush_body {
+ ns_cache flush util_memoize $script
+}
+
+ad_proc -public util_memoize_flush {script} {
+ Forget any cached value for script. If clustering is
+ enabled, flush the caches on all servers in the cluster.
+
+ @param script The Tcl script whose cached value should be flushed.
+} $flush_body
+
+unset flush_body
Index: openacs-4/packages/acs-tcl/tcl/memoize-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/memoize-procs.tcl,v
diff -u -r1.9.6.1 -r1.9.6.2
--- openacs-4/packages/acs-tcl/tcl/memoize-procs.tcl 25 Jan 2006 14:03:03 -0000 1.9.6.1
+++ openacs-4/packages/acs-tcl/tcl/memoize-procs.tcl 6 Feb 2006 16:12:24 -0000 1.9.6.2
@@ -85,35 +85,6 @@
ns_cache flush util_memoize $script
}
-# We construct the body of util_memoize_flush differently depending
-# on whether clustering is enabled and what command is available for
-# cluster-wide flushing.
-
-if {[llength [info commands ncf.send]] > 0} {
- set flush_body {
- ncf.send util_memoize $script
- }
-} elseif {[llength [info commands server_cluster_httpget_from_peers]] > 0} {
- set flush_body {
- server_cluster_httpget_from_peers "/SYSTEM/flush-memoized-statement.tcl?statement=[ns_urlencode $script]"
- }
-} else {
- set flush_body {}
-}
-
-append flush_body {
- ns_cache flush util_memoize $script
-}
-
-ad_proc -public util_memoize_flush {script} {
- Forget any cached value for script. If clustering is
- enabled, flush the caches on all servers in the cluster.
-
- @param script The Tcl script whose cached value should be flushed.
-} $flush_body
-
-unset flush_body
-
ad_proc -public util_memoize_cached_p {script {max_age ""}} {
Check whether script's value has been cached, and whether it
was cached no more than max_age seconds ago.