By default, caching is turned off for the inventory repository. This is to insure that inventory data is always up to date across server instances. The CachingInventoryManager is provided as an effective inventory caching mechanism for displaying inventory information.

The CachingInventoryManager can be used to display information to customers as they browse the product catalog because, in most situations, inventory information displayed to customers during catalog browsing does not need to be updated in real time. Displaying inventory information using the CachingInventoryManager improves the performance of the site.

The CachingInventoryManager should not be used when real time inventory data is needed. Real time inventory information is usually needed during the purchase process and fulfillment process. In those cases, the (uncached) InventoryManager should be used during these processes. For more information on the CachingInventoryManager, see the InventoryManager Implementations section.

The InventoryDroplet provides cached data to the user when appropriate and accesses real time inventory data from the repository when appropriate. The useCache property allows you to indicate when to use cached inventory data:

  • If the useCache property is set to false, the inventory data in the repository is provided.

  • If the useCache property is set to true, the cached data is provided.

The GSA can provide more complex types of caching. If appropriate, you can configure two instances of the InventoryRepository GSA, one with no caching and one with distributed caching (set cache-mode=distributed). You can configure one instance of the RepositoryInventoryManager to use the uncached GSA, and another instance of the RepositoryInventoryManager to use the cached GSA. For more information on distributed caching, see the SQL Repository Caching chapter in the ATG Repository Guide.

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices