If an application modifies an item whose item descriptor specifies distributed TCP caching mode, a cache invalidation event is broadcast from that Oracle ATG Web Commerce instance to all other Oracle ATG Web Commerce instances that use distributed TCP caching. The event message supplies the nature of the change, the changed item’s type, and repository ID. Receiving repositories respond by invalidating that cached item.
Distributed TCP caching is suitable for sites where the following conditions are true:
Items of a type that specifies distributed TCP caching are likely to be cached across most Oracle ATG Web Commerce instances in the application.
Items are subject to frequent reads.
Items are rarely changed, added or deleted.
An item that changes frequently—say, more than 50 or 100 times per second —is not suitable for distributed TCP caching mode, because the extra network activity incurred by cache invalidation messages outweighs caching benefits. Cache invalidation events are broadcast to all Oracle ATG Web Commerce instances that enable distributed caching, even if they do not cache the invalidated item; as the number of these Oracle ATG Web Commerce instances increases, so too increases the network activity associated with each cache invalidation event.
Implementation
Distributed TCP caching is implemented by the following elements:
Cache invalidation events of class
atg.adapter.gsa.event.GSAEvent
convey cache changes to other Oracle ATG Web Commerce instances, identifying the event type, item descriptor name, and repository ID.Event server components of class
atg.adapter.gsa.event.GSAEventServer
send and receive cache invalidation events over TCP among participating Oracle ATG Web Commerce instances. All repositories in an Oracle ATG Web Commerce instance reference the same event server. When instantiated, the event server opens up a server socket on the specified port or, if unspecified, on one that is randomly assigned.das_gsa_subscriber
is a database table that maintains routing information for each item descriptor that uses distributed TCP caching. This table provides the address and port of each event server that provides access to a given item descriptor. When a change occurs on one Oracle ATG Web Commerce instance to an item that uses distributed TCP caching, its repository usesdas_gsa_subscriber
to look up the same item descriptors on other Oracle ATG Web Commerce instances. It then generates a cache invalidation event with their routing information.
The following graphic shows how updates to a cached repository item on Oracle ATG Web Commerce server Alamo trigger an invalidation event that is broadcast to other Oracle ATG Web Commerce servers, whose GSAEventServers relay it to the corresponding repositories: