• Publicity: Public Only All

memoize-procs.tcl

Defines a convenient cache mechanism, util_memoize.

Location:
packages/acs-tcl/tcl/memoize-procs.tcl
Created:
2000-10-19
Authors:
Various [acs@arsdigita.com]
Rob Mayoff
Victor Guerra
Gustaf Neumann
CVS Identification:
$Id: memoize-procs.tcl,v 1.20 2024/09/11 06:15:48 gustafn Exp $

Procedures in this file

Detailed information

util_memoize_flush (public)

 util_memoize_flush script

Forget any cached value for script. If clustering is enabled, flush the caches on all servers in the cluster.

Parameters:
script (required)
The Tcl script whose cached value should be flushed.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_get_client_property ad_get_client_property (public) util_memoize_flush util_memoize_flush ad_get_client_property->util_memoize_flush apm::convert_type apm::convert_type (public) apm::convert_type->util_memoize_flush apm_flush_package_id_cache apm_flush_package_id_cache (public) apm_flush_package_id_cache->util_memoize_flush auth::authority::get_flush auth::authority::get_flush (private) auth::authority::get_flush->util_memoize_flush auth::authority::get_id_flush auth::authority::get_id_flush (private) auth::authority::get_id_flush->util_memoize_flush acs::clusterwide acs::clusterwide util_memoize_flush->acs::clusterwide

Testcases:
No testcase defined.

util_memoize_flush_regexp (public)

 util_memoize_flush_regexp [ -log ] expr

Loop through all cached entries, flushing all that match the regular expression that was passed in. It is recommended to use util_memoize_flush_pattern whenever possible, since glob-match is in most cases sufficient and much better performance-wise. the glob match can be better supported by the built-in set of the server.

Switches:
-log (optional, boolean)
Whether to log keys checked and flushed (useful for debugging).
Parameters:
expr (required)
The regular expression to match.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_util_memoize_cache_flush util_memoize_cache_flush (test acs-tcl) util_memoize_flush_regexp util_memoize_flush_regexp test_util_memoize_cache_flush->util_memoize_flush_regexp acs::clusterwide acs::clusterwide util_memoize_flush_regexp->acs::clusterwide ad_cache_returnredirect ad_cache_returnredirect (public) ad_cache_returnredirect->util_memoize_flush_regexp application_data_link::new_from application_data_link::new_from (public) application_data_link::new_from->util_memoize_flush_regexp application_data_link::new_to application_data_link::new_to (public) application_data_link::new_to->util_memoize_flush_regexp auth::authority::get_flush auth::authority::get_flush (private) auth::authority::get_flush->util_memoize_flush_regexp auth::authority::get_id_flush auth::authority::get_id_flush (private) auth::authority::get_id_flush->util_memoize_flush_regexp

Testcases:
util_memoize_cache_flush

util_memoize_initialized_p (public, deprecated)

 util_memoize_initialized_p
Deprecated. Invoking this procedure generates a warning.

Return 1 if the util_memoize cache has been initialized and is ready to be used and 0 otherwise. util_memoize has now a failsafe mechanism when invoked before the cache is there.

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
[ show source ]