Network Deployment (Distributed operating systems), v8.0 > End-to-end paths > Dynamic caching > Improve service with the dynamic cache service > Task overview: Using the dynamic cache service to improve performance > Use the DistributedMap and DistributedObjectCache interfaces for the dynamic cache


Cache instances

An application uses a cache instance to store, retrieve, and share data objects within the dynamic cache.

Each cache instance can be configured independently for JNDI name, cache size, priority, and disk offload. Objects that are stored in a particular cache instance are not affected by other cache instances. This means that if you store an object named object_1 with a value of object_data in cache_instance_x, you can also store an object with the same name, but different value in cache_instance_y.

Objects that are stored in a particular cache instance are available to applications on other servers by accessing a cache instance of the same name. The two servers must be within the same replication domain to share data.

There are two types of cache instances, object cache instances and servlet cache instances.

An object cache instance is a location in addition to the default shared dynamic cache where J2EE applications can store, distribute, and share objects. After configuring object cache instances, you can use the DistributedMap or DistributedObjectCache interfaces in the com.ibm.websphere.cache package to programmatically access your cache instances.

See the Additional Application Programming Interfaces (APIs) for more information about the DistributedMap or DistributedObjectCache interfaces.
Servlet cache instances are locations in addition to the default dynamic cache where dynamic cache can store, distribute, and share the output and the side effects of an invoked servlet. By configuring a servlet cache instance, the applications have greater flexibility and better tuning of cache resources. The JNDI name specified for the cache instance in the administrative console maps to the <cache-instance> element in the cachespec.xml configuration file. Any <cache-entry> elements specified within a <cache-instance> element are created in that specific cache instance. Any <cache-entry> elements specified outside of a <cache-instance> element are stored in the default dynamic cache instance.

See Use servlet cache instances for more information.
Use the DistributedMap and DistributedObjectCache interfaces for the dynamic cache
Use object cache instances
Use servlet cache instances


Related


Task overview: Accessing data from applications
cachespec.xml file Concept topic

+

Search Tips   |   Advanced Search