sun-web.xml Visual Editor: Cache General

See Also

The sun-web.xml visual editor lets you edit the platform-specific web deployment descriptor for Sun Java System Application Server. You open the visual editor by expanding your project's Configuration Files node in the Projects window and double-clicking the sun-web.xml file. A web application only contains a sun-web.xml deployment descriptor if its target server is the Sun Java System Application Server.

The Cache General tab helps you specify properties for configuring a web application's cache. From this tab, you can do the following:

Cache Settings

Optionally, check the Cache Enabled box to enable Servlet and JSP caching.

Maximum Entries

Optionally, use the Maximum Entries field to specify the maximum number of entries the cache can contain. The value must be a positive integer.

Timeout (secs)

Optionally, use the Timeout (secs) field to set the maximum amount of time in seconds that an entry can remain in the cache after it is created or refreshed. This value can be overridden by a timeout element.

Cache Properties

The following table lists the properties of the cache element.

Name Value
cacheClassName The fully qualified name of the class that implements the cache functionality. The default value is com.sun.appserv.web.cache.LruCache. The section Cache Class Names that follows this table provides you more description about these classes.
MultiLRUSegmentSize An integer value representing the number of entries in a segment of a cache table that has its own LRU (least recently used) list. The default value is 4096. This value is applicable only if cacheClassName is set to com.sun.appserv.web.cache.MultiLruCache.
maxSize The upper limit of the cache memory size, in bytes (KB or MB units). This value is applicable only if cacheClassName is set to com.sun.appserv.web.cache.BoundededMultiLruCache.

Cache Class Names

The following table lists the possible values of the cacheClassName property.

Name Description
com.sun.appserv.web.cache.LruCache A bounded cache with an LRU cache replacement policy.
com.sun.appserv.web.cache.BaseCache An unbounded cache. This class is useful if the maximum number of entries in the cache is known.
com.sun.appserv.web.cache.MultiLruCache A cache suitable for a large number of entries (>4096). This class uses the MultiLRUSegmentSize property.
com.sun.appserv.web.cache.BoundedMultiLruCache A cache suitable for limiting the cache size by memory rather than number of entries. This class uses the MaxSize property.
See also

About Deployment Descriptors
Editing a Web Application's Deployment Descriptors
Changing the Target Server
sun-web.xml Visual Editor:
         General
         Session
         Messages
         Locale
         Web Service Descriptor


Legal Notices