GetClickThroughId
uses a session-based cache component, /atg/search/cache/SearchQueryCache
, to store results returned by Oracle ATG Web Commerce Search. This cache uses a Least Recently Used (LRU) storage algorithm. This means that if the cache is full, whenever a new item is added to the cache, the oldest item is discarded.
Discarding items can make reporting less accurate, but prevents the cache from becoming too large and consuming too much memory. To optimize the tradeoff between accuracy and resource use, you can set the following properties of the SearchQueryCache
component:
queryCount
-- Specifies the maximum number of search request/response objects to store. Default is 10. To specify no maximum, set this value to -1.documentCount
-- Specifies the maximum number of documents to store per search request/response. A document is stored in the cache if the page of results it is on is displayed. So, for example, if 10 results are displayed per page, and the user views the first 3 pages of results, 30 documents are stored in the cache for that response. Default is 1000. To specify no maximum, set this value to -1.
Note that the LRU caching algorithm is applied independently to the number of search queries and the number of documents per search query. So, for example, if queryCount
is set to 5, and a user enters 6 search queries, the results from the first query are discarded from the cache, regardless of how many documents are returned for the other stored queries. Similarly, if documentCount
is set to 100, and the user pages through the first 12 pages of results for a query (with 10 results displayed per page), then the cache will store documents 21 through 120, and the first 20 documents will be discarded; but none of the other stored queries will be affected.