Caching Portlet Content
You might occasionally want to run a job to cache portlet
content (for example, if
the portlet takes a couple minutes to render). When the job runs,
it creates a snapshot
of the portlet content (in the form of a static HTML file) that can
be displayed
on a web site. The file is stored in the shared files directory (for
example, C:\bea\ALUI\ptportal\6.5)
in \StagedContent\Portlets\<portletID>\Main.html. You can then create another portlet
that simply displays the static HTML.
Note: The shared files directory path is set on the Portal URL Manager page of the Portal
Settings Utility.
To run a portlet as a job you must have the
following rights and privileges:
- Access Administration activity right
- Create Jobs activity right
- At least Edit access to the parent folder (the folder that will
store the job)
- At least Select access to the portlet
Note:
- Because intrinsic portlets rely on the portal application, you
cannot run an intrinsic portlet
as a job.
- Because the content produced is static you should only run portlets
that present
information that is valuable when updated on a periodic basis. For
example, a report
portlet would be ideal to run as a job, while more interactive portlets,
like application
interfaces would not be appropriate.
- If the portlet includes preferences, the preferences for the user
that creates the
job will be used.
- Click Administration.
- Open the folder in which you want to store the portlet
job.
Note: In order for the job to run, the folder must be registered
with an Automation Service.
- In the Create Object drop-down list,
select Job.
- On the Main Settings page, click Add
Operation.
- Select the portlets you want to run with this job, and
click OK.
- Under Schedule, select the frequency
with which you want this job to run.