The /atg/endeca/assembler/cache/SearchRequestCache
component, of class atg.endeca.assembler.cache.SearchRequestCache
, is a session-scoped component that manages cached search results. Each cache entry includes a search ID and the associated records for that search. Rather than storing complete records (which may use a lot of memory), the entries are objects of class atg.endeca.assembler.cache.SearchRecord
, which include only a subset of the record properties.
The SearchRequestCache
component’s recordIdProperty
specifies a record property to use as a unique key for storing and retrieving the SearchRecord
objects in the record cache. The key can be any property that uniquely identifies the record. By default, this is set to:
recordIdPropertyName=product.repositoryId
Note that you must ensure that the record property is included in the ContentItem
returned by the Assembler. To do this, the property must be listed in the fieldNames
property of the /atg/endeca/assembler/cartridge/handler/config/ResultsListConfig
component. By default, this property is set to:
fieldNames=record.id,record.type.raw,product.repositoryId
If you use a record property that is not in this list as your key, be sure to add that property to fieldNames
.
The cache is designed as a Least Recently Used (LRU) cache, so if the cache is full and another entry is received, the oldest entry is deleted to make room. To optimize the tradeoff between reporting accuracy and resource use, you can tune the number of request objects in the cache and the number of records that should be cached per request by setting the following properties of the SearchRequestCache
component:
requestCount
-- Specifies the maximum number of search request/response objects to store. Default is 10. To specify no maximum, set this value to -1.recordCount
-- Specifies the maximum number of records to store per search request/response. Default is 1000. To specify no maximum, set this value to -1.