- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::acs::SiteNodesCache
::acs::SiteNodesCache create ...acs::SiteNodesCache is a mixin class implementing caching of SiteNode objects. Add/remove extra caching methods as when more operations should be cached. Removing the registry of the object mixin deactivates caching for these methods completely.
Defined in packages/acs-tcl/tcl/site-nodes-procs.tcl
Class Relations
Methods (to be applied on instances)
flush_cache (scripted, public)
<instance of acs::SiteNodesCache> flush_cache -node_id node_id \ [ -with_subtree on|off ] [ -url url ]Flush entries from site-node tree, including the current node, the root of flushed (sub)tree. If the node_id is not provided, or it is the node_id of root of the full site-node tree, flush the whole tree.
- Switches:
- -node_id (required)
- -with_subtree (optional, boolean, defaults to
"true"
)- -url (optional)
- Testcases:
- No testcase defined.
flush_pattern (scripted, public)
<instance of acs::SiteNodesCache> flush_pattern \ [ -partition_key partition_key ] patternFlush from the site-nodes caches certain information. The method hides the actual caching structure and is as well provided in conformance with the alternative implementations above. Depending on the specified pattern, it reroutes the flushing request to different caches.
- Switches:
- -partition_key (optional)
- Parameters:
- pattern (required)
- Testcases:
- No testcase defined.
get_children (scripted, public)
<instance of acs::SiteNodesCache> get_children -node_id node_id \ [ -all ] [ -package_type package_type ] \ [ -package_key package_key ] [ -filters filters ] \ [ -element element ]Cache get_children operations, except, when "-all" was specified. The underlying operation can be quite expensive, when huge site-node trees are explored. Since the argument list influences the results, we cache for every parameter combination. Since this cache contains subtrees, we have to flush trees, which is implemented via pattern flushes. So we use a separate cache to avoid long locks on site-nodes in general.
- Switches:
- -node_id (required, integer)
- -all (optional)
- -package_type (optional)
- -package_key (optional)
- -filters (optional)
- -element (optional)
- Testcases:
- No testcase defined.
get_node_id (scripted, public)
<instance of acs::SiteNodesCache> get_node_id -url urlCache the result of the upstream implementation of get_node_id in the acs::site_nodes_id_cache cache.
- Switches:
- -url (required)
- Testcases:
- No testcase defined.
get_package_url (scripted, public)
<instance of acs::SiteNodesCache> get_package_url \ -package_key package_keyCache the result of the upstream implementation of get_package_url in the acs::site_nodes_cache. Note: the cache value from the following method must currently be explicitly flushed. We do that, for instance, when we mount a new package.
- Switches:
- -package_key (required)
- Testcases:
- No testcase defined.
get_url (scripted, public)
<instance of acs::SiteNodesCache> get_url -node_id node_idIt's a pain, but OpenACS and its regression test call "get_url" a few times with an empty node_id. Shortcut these calls here to avoid problems with the non-numeric partition_key.
- Switches:
- -node_id (required)
- Testcases:
- No testcase defined.
get_urls_from_object_id (scripted, public)
<instance of acs::SiteNodesCache> get_urls_from_object_id \ -object_id object_idCache the result of the upstream implementation of get_urls_from_object_id in the acs::site_nodes_cache.
- Switches:
- -object_id (required, integer)
- Testcases:
- No testcase defined.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables