package_object_view_reset (public)

 package_object_view_reset object_type

Defined in packages/acs-subsite/tcl/package-procs.tcl

Resets the cached views for all chains (e.g. all variations of start_with in package_object_view) for the specified object type.

Parameters:
object_type (required)
Author:
Michael Bryzek <mbryzek@arsdigita.com>
Created:
12/2000

Partial Call Graph (max 5 caller/called nodes):
%3 group_type::delete group_type::delete (public) package_object_view_reset package_object_view_reset group_type::delete->package_object_view_reset package_create package_create (private) package_create->package_object_view_reset package_object_view package_object_view (public) package_object_view->package_object_view_reset packages/acs-subsite/www/admin/rel-types/delete-2.tcl packages/acs-subsite/ www/admin/rel-types/delete-2.tcl packages/acs-subsite/www/admin/rel-types/delete-2.tcl->package_object_view_reset db_foreach db_foreach (public) package_object_view_reset->db_foreach util_memoize_cached_p util_memoize_cached_p (public) package_object_view_reset->util_memoize_cached_p util_memoize_flush util_memoize_flush (public) package_object_view_reset->util_memoize_flush

Testcases:
No testcase defined.
Source code:
    # First flush the cache for all pairs of object_type, ancestor_type (start_with)
    db_foreach select_ancestor_types {} {
        if { [util_memoize_cached_p [list package_object_view_helper -start_with $ancestor_type $object_type]] } {
            util_memoize_flush [list package_object_view_helper -start_with $ancestor_type $object_type]
        }
    }

    # flush the cache for all pairs of sub_type, object_type(start_with)
    db_foreach select_sub_types {} {
        if { [util_memoize_cached_p [list package_object_view_helper -start_with $object_type $sub_type]] } {
            util_memoize_flush [list package_object_view_helper -start_with $object_type $sub_type]
        }
    }
Generic XQL file:
packages/acs-subsite/tcl/package-procs.xql

PostgreSQL XQL file:
<fullquery name="package_object_view_reset.select_ancestor_types">
    <querytext>

        select t2.object_type as ancestor_type
          from acs_object_types t1, acs_object_types t2
         where t1.tree_sortkey between t2.tree_sortkey and tree_right(t2.tree_sortkey)
           and t1.object_type = :object_type

      </querytext>
</fullquery>

<fullquery name="package_object_view_reset.select_sub_types">
    <querytext>

        select t2.object_type as sub_type
          from acs_object_types t1, acs_object_types t2
         where t2.tree_sortkey between t1.tree_sortkey and tree_right(t1.tree_sortkey)
           and t1.object_type = :object_type

      </querytext>
</fullquery>
packages/acs-subsite/tcl/package-procs-postgresql.xql

Oracle XQL file:
<fullquery name="package_object_view_reset.select_ancestor_types">
    <querytext>
      
	select t.object_type as ancestor_type
	  from acs_object_types t 
	 start with t.object_type = :object_type 
       connect by prior t.supertype = t.object_type
    
      </querytext>
</fullquery>

<fullquery name="package_object_view_reset.select_sub_types">
    <querytext>
      
	select t.object_type as sub_type
	  from acs_object_types t 
	 start with t.object_type = :object_type 
       connect by prior t.object_type = t.supertype
    
      </querytext>
</fullquery>
packages/acs-subsite/tcl/package-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: