Show TOC Entering content frame

Function documentation Caching Locate the document in its SAP Library structure

Use

Caching stores in memory for a preconfigured amount of time content that has been retrieved by an iView request. Successive identical requests first access the cache, rather than resubmitting the query to the data source, and if the cache has not expired, the iView displays the information contained there. Caching improves response time and overall system performance by reducing the load on the information source.

While we usually use the portal cache to improve the response time of content that does not change frequently, applying caching to content that is updated often is also worthwhile, because it still takes time to generate the content.

The browser has a similar mechanism to that of the portal cache, whereby it can store content on the client side and display it as long as it is valid. This further improves response time by reducing the load on the portal, because the browser uses its stored content instead of requesting it from the portal.

 

Integration

The caching mechanism is part of the portal runtime and operates according to specific application and iView settings. Activating the various levels of caching entails configuring iView properties that:

            Allow caching in the client browser

            Set the cache level

            Set the validity period of the cache

            Automatically refresh iViews from cache

 

Caution 

The setting of the Enable Client-Side Caching property, an application cache property that administers the client browser cache, can override your iView cache settings. For information on setting application caching properties, see Administrating Application Caching.

 

Allow Client-Side Caching

This property is used to define whether an iView’s content can be cached in the client browser, as well as in the portal cache. If caching an iView on the portal improves performance, then allowing client-side caching further enhances it.

The only drawback to client-side caching concerns iViews that display sensitive or private content, which you would not want to store locally on the browser machine.

The property values are:

            Yes (default)

Enable browser cache settings to be defined per iView

            No

Disable the browser cache for all iViews, regardless of individual iView settings

Cache level

You determine the cache level according to the content of the iView, the speed of retrieval, and the configured time of loading. The four cache levels are:

            None (default)

iView content is never cached. Each time the iView is launched, it accesses the content source. This level is appropriate for iViews retrieving information that is constantly changing and being updated, such as a news bulletin iView, or a ticker to a stock exchange.

            Session

iView content is cached for the current session. Each new logon empties the cache and the iView must access the source. An iView retrieving secured content would likely use this level.

            User

iView content is cached per user. New users who launch the iView receive content from the data source. An iView representing a user’s daily tasks is appropriate for this cache level.

            Shared

iView content retrieved by first user is cached for all users. This level is suitable for iViews displaying information relevant to all users, such as company announcements.

·        Roles

iView content is cached for all users with the same combination of roles (one instance per role combination). This level is used specifically for caching the Top-Level Navigation iView. For information see Caching the Top-Level Navigation iView.

 

Note

Another possibility, which would be compatible with all the cache levels except None, is to set the iView cache validity period (see below) to “-1”, creating an “always cached” situation. An iView whose content never changes, such as a Welcome iView, does not require updating.

 

To set an iView’s cache level, in the Property Editor of the iView in focus, browse to the Cache Level property and choose the level you want to assign.

Cache validity

This setting defines the expiration time of iView content stored in cache. Once the cache has expired, the iView must access the data source for its content.

 

Note

Refreshing an iView from the options menu forces it to retrieve updated content from source, even if the cache is still valid.

Refreshing a page from the options menu forces iViews to update their content from source, even if their caches are still valid.

iViews set to Shared cache level are not affected, since all users receive identical content that cannot be individually updated.

 

Cache validity is respected, regardless of any particular cache level except None. For example, if the cache level is “Session”, and the cache validity is “2 hours”, the iView content will be retrieved from source the first time a user logs on, and then will come from cache for the next two hours only, even if the session lasts 4 hours.

 

Note

Synchronize cache validity and cache level as logically as possible.

 

To set an iView’s cache validity, in the Property Editor of the iView in focus, browse to the Cache Validity Period property, and enter the time frame you need. Cache validity is measured in milliseconds.

Auto Refresh

This iView property tells the portal to automatically query the server for new content every specified number of seconds and refresh a cached iView.

The values are:

Yes

Portal queries server automatically; iView displays refreshed content

No

Portal does not query server automatically; iView displays what is in cache

Business Intelligence Warehouse iViews

Formerly, the portal had to issue separate requests to the cache and to the BW back-end application in order to display BW content. Now the portal serves as a proxy between BW and the browser. The portal can request and retrieve BW content, including SAP items such as icons, and store both the iViews and the images in cache. The portal also authenticates all BW content, thereby resolving security and performance issues.

Page Caching

The portal supports a page caching mechanism that caches an entire page with its embedded iViews. This functionality does not require you to perform any configurations.

The mechanism automatically determines:

·         Whether the page can be cached

·         The cache level, according to the type of iViews comprising the page

The validity period remains viable until any of the iViews is changed.

 

 

 

Leaving content frame