| Oracle Application Server Portal PL/SQL API Reference - 904 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||
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:
| Function/Procedure Summary | |
execute_cache_invalidation | |
invalidate_by_instance | |
invalidate_by_portlet | |
invalidate_by_provider | |
invalidate_by_user_portlet | |
invalidate_by_user_provider | |
invalidate_cache | |
| Function/Procedure Detail |
procedure execute_cache_invalidation
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;
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
) 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
);
p_provider_id - the ID of the providerp_portlet_id - the ID of the portletp_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
procedure invalidate_by_portlet(
p_provider_id in number,
p_portlet_id in number
) 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
);
p_provider_id - the ID of the providerp_portlet_id - the ID of the portlet
procedure invalidate_by_provider(
p_provider_id in number
) 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
);
p_provider_id - the ID of the provider
procedure invalidate_by_user_portlet(
p_provider_id in number,
p_portlet_id in number,
p_user in varchar2 default wwctx_api . get_user
) 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
);
p_provider_id - the ID of the providerp_portlet_id - the ID of the portletp_user - the OracleAS Portal 10G user
procedure invalidate_by_user_provider(
p_provider_id in number,
p_user in varchar2 default wwctx_api . get_user
) 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
);
p_provider_id - the ID of the providerp_user - the OracleAS Portal 10G user
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
) 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
);
p_provider_id - the ID of the providerp_portletid - the ID of the portletp_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 userp_content_type - the portal content type of the request,
i.e. GENERIC_HTML, MOBILE, etc.p_language - the language of the portlet contentp_subscriber_id - the subscriber ID
| Oracle Application Server Portal PL/SQL API Reference - 904 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||