Oracle Application Server Portal PL/SQL API Reference - 904

Package wwpro_api_invalidation

This package contains procedures to invalidate the cache of portlets in Oracle Application Server Web Cache.

Portlet developers should use these APIs when the content of their portlets change. For example, a call to invalidate the cache may be necessary in code that allows a user to customize a portlet.

Portlet cache can be invalidated by specifying any of the following parameters:

Scope:
Public
Since:
Oracle9iAS Portal 9.0.2


Function/Procedure Summary
execute_cache_invalidation
The procedure is designed to perform invalidations from SQLPLUS.
 
invalidate_by_instance
Invalidates the OracleAS Web Cache, given a portlet instance ID.
 
invalidate_by_portlet
Invalidates the OracleAS Web Cache, given a portlet ID.
 
invalidate_by_provider
Invalidates the OracleAS Web Cache, given a provider ID.
 
invalidate_by_user_portlet
Invalidates the OracleAS Web Cache, given a user provider ID and portlet ID.
 
invalidate_by_user_provider
Invalidates the OracleAS Web Cache, given a user and provider ID.
 
invalidate_cache
Invalidates the OracleAS Web Cache, given a set of parameters that together define a URL.
 

Function/Procedure Detail

execute_cache_invalidation

procedure execute_cache_invalidation
The procedure is designed to perform invalidations from SQLPLUS.

Call this procedure to execute the Portal cache invalidation messages which were created during the SQLPLUS session. When calling APIs in SQLPLUS, cache cleanup is not performed on the fly. Instead, the actions that need to be taken are recorded for future execution. This API will execute those cache invalidations.

Note: If this API is not called, then changes based upon the work done in SQLPLUS may not be visible to the user immediately. This however is not a permanent situation as the cache cleanup will still be done when the background invalidation job runs. It is up to the discretion of the programmer as to weather or not this API needs to be called.

Also: This procedure should be called ONLY from PLSQL

Example:

     . . .
     //Some call that will cause invalidations like register_provider
     wwapi_provider_registry.register_provider(prov_record);
     . . .
     wwpro_api_invalidation.execute_cache_invalidation;
 
Since:
Oracle9iAS Portal 9.0.2

invalidate_by_instance

procedure invalidate_by_instance(
    p_provider_id in number,
    p_portlet_id in number,
    p_instance_id in varchar2,
    p_user in varchar2 default null
) 
Invalidates the OracleAS Web Cache, given a portlet instance ID.

Call this procedure to invalidate the user cache for a portlet instance.

Note: This bulk invalidation is accomplished using a single call to the OracleAS Web Cache listener.

Example:

     wwpro_api_invalidation.invalidate_by_instance(
         p_provider_id => 5,
         p_portlet_id  => 22,
         p_instance_id => 80,
         p_user        => wwctx_api.get_user
     );
 
Parameters:
p_provider_id - the ID of the provider
p_portlet_id - the ID of the portlet
p_instance_id - the portlet instance ID. A portlet instance is the display of a portlet on a single page. The same portlet may be displayed multiple times on the same page. Each time a portlet is added to a page, OracleAS Portal 10G generates a unique ID that is the instances portlet instance ID.
p_user - the OracleAS Portal 10G user
Since:
Oracle9iAS Portal 9.0.2

invalidate_by_portlet

procedure invalidate_by_portlet(
    p_provider_id in number,
    p_portlet_id in number
) 
Invalidates the OracleAS Web Cache, given a portlet ID.

Call this procedure to invalidate the cache for all portlets instances identified by the provider ID and portlet ID pair.

Note: This bulk invalidation is accomplished using a single call to the OracleAS Web Cache listener.

Example:

     wwpro_api_invalidation.invalidate_by_portlet(
         p_provider_id => 5,
         p_portlet_id  => 22
     );
 
Parameters:
p_provider_id - the ID of the provider
p_portlet_id - the ID of the portlet
Since:
Oracle9iAS Portal 9.0.2

invalidate_by_provider

procedure invalidate_by_provider(
    p_provider_id in number
) 
Invalidates the OracleAS Web Cache, given a provider ID.

Call this procedure to invalidate the cache for all portlets belonging to a particular provider, given the provider ID.

Note: This bulk invalidation is accomplished using a single call to the OracleAS Web Cache listener.

Example:

     wwpro_api_invalidation.invalidate_by_provider (
         p_provider_id => 5
     );
 
Parameters:
p_provider_id - the ID of the provider
Since:
Oracle9iAS Portal 9.0.2

invalidate_by_user_portlet

procedure invalidate_by_user_portlet(
    p_provider_id in number,
    p_portlet_id in number,
    p_user in varchar2 default wwctx_api . get_user
) 
Invalidates the OracleAS Web Cache, given a user provider ID and portlet ID.

Call this procedure to invalidate the user cache of a portlet, from the given provider.

Note: This bulk invalidation is accomplished using a single call to the OracleAS Web Cache listener.

Example:

     wwpro_api_invalidation.invalidate_by_user_portlet(
         p_provider_id => 5,
         p_portlet_id  => 22,
         p_user        => wwctx_api.get_user
     );
 
Parameters:
p_provider_id - the ID of the provider
p_portlet_id - the ID of the portlet
p_user - the OracleAS Portal 10G user
Since:
Oracle9iAS Portal 9.0.2

invalidate_by_user_provider

procedure invalidate_by_user_provider(
    p_provider_id in number,
    p_user in varchar2 default wwctx_api . get_user
) 
Invalidates the OracleAS Web Cache, given a user and provider ID.

Call this procedure to invalidate the cache for all portlets of a provider, for a given user.

Note: This bulk invalidation is accomplished using a single call to the OracleAS Web Cache listener.

Example:

     wwpro_api_invalidation.invalidate_by_user_provider(
         p_provider_id => 5,
         p_user        => wwctx_api.get_user
     );
 
Parameters:
p_provider_id - the ID of the provider
p_user - the OracleAS Portal 10G user
Since:
Oracle9iAS Portal 9.0.2

invalidate_cache

procedure invalidate_cache(
    p_provider_id in number,
    p_portletid in number default null,
    p_instance_id in varchar2 default null,
    p_user in varchar2 default null,
    p_content_type in varchar2 default null,
    p_language in varchar2 default null,
    p_subscriber_id in number default null,
    p_auth_level in varchar2 default null
) 
Invalidates the OracleAS Web Cache, given a set of parameters that together define a URL.

Call this procedure to invalidate the OracleAS Web Cache, given a set of parameters that together define a URL.

Note: The only required parameter is p_provider_id, all other parameters are optional and any combination of these parameters can be specified.

This API is provided for the more experienced user. Given the correct parameters, it invalidates the same content as the other invalidation APIs. It is provided as an additional invalidation utility for portlet developers.

Example:

     wwpro_api_invalidation.invalidate_cache(
         p_provider_id   => 5,
         p_portletid     => 22,
         p_instance_id   => 80,
         p_user          => wwctx_api.get_user
         p_content_type  => 'GENERIC_HTML',
         p_language      => 'en_us',
         p_subscriber_id => 1
     );
 
Parameters:
p_provider_id - the ID of the provider
p_portletid - the ID of the portlet
p_instance_id - the portlet instance ID. A portlet instance is the display of a portlet on a single page. The same portlet may be displayed multiple times on the same page. Each time a portlet is added to a page, OracleAS Portal 10G generates a unique ID that is the instances portlet instance ID.
p_user - the OracleAS Portal 10G user
p_content_type - the portal content type of the request, i.e. GENERIC_HTML, MOBILE, etc.
p_language - the language of the portlet content
p_subscriber_id - the subscriber ID
Since:
Oracle9iAS Portal 9.0.2

Oracle Application Server Portal PL/SQL API Reference - 904