- 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
- util_memoize_flush (public)
- util_memoize_flush_local (private)
- util_memoize_flush_regexp (public)
- util_memoize_flush_regexp_local (private)
- util_memoize_initialized_p (public, deprecated)
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):
- Testcases:
- No testcase defined.
util_memoize_flush_local (private)
util_memoize_flush_local script
Forget any cached value for script on the local server. You probably want to use
util_memoize_flush
to flush the caches on all servers in the cluster, in case clustering is enabled.
- Parameters:
- script (required)
- The Tcl script whose cached value should be flushed.
- Partial Call Graph (max 5 caller/called nodes):
- 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):
- Testcases:
- util_memoize_cache_flush
util_memoize_flush_regexp_local (private)
util_memoize_flush_regexp_local [ -log ] expr
Loop through all cached scripts, 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):
- Testcases:
- No testcase defined.
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):
- Testcases:
- No testcase defined.