# Shop Cachehit

If your shop maintains its own cache and search and navigation requests are answered through this cache without forwarding the request to FactFinder, then please pass the `log` event in order to notify FactFinder. This is important for correct analyses as well as for modules which are based on search amounts (such as **ASO**). With this event you are sending the most important basic data of the search result, delivered from your cache.

The log event needs the event, `sid`, and `channel` [General Parameters](/integration/tracking-interface/general-parameters.md). The session ID which has to be passed is the ID of the request which was answered by your cache and not the session ID of the request which created the cached search result. Additionally the following parameters must resp. can be passed:

| Parameter         | Required  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| query             | essential | The search term for which a search was conducted and on which feedback has been provided.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| page              | essential | The number of the search result page on which the selected product was displayed. The first page has the number 1.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| pageSize          | essential | The number of products per search result page at the time the click was executed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| hitCount          | essential | The amount of products found in the search result.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| searchTime        | essential | The time which was needed to create the search result.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| bestSimi          | essential | Similarity of the best product.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| minSimi           | essential | Similarity of the last product.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| filter\[FELDNAME] | essential | Information about active filters in the search result. This parameter consists of the `prefix` filter followed by the name of the field on which the filter was applied, such as `filterManufacturer`. This parameter can be present multiple times because multiple filters can be set in multiple fields. The value of this parameter consists of the respective filter value, with the value being equivalent with the filter value of a search request. Please be aware, that you can set the used characters for `and, or` and `not` per channel in the `config.xml`. The value for this parameter must use the same characters as the filters in your search requests. If, for example, you use `~~~` for `or`, \_\_\_ for `and` and `!` for `not`, then the following parameter has to be used for a filter which filters `red or not blue and yellow: red~~~!blue___yellow`. The log event does not differentiate between filters and sub string filters. Please send all active filters through this parameter. |
| searchField       | essential | The field for which the search was performed in case the search was limited to a specific field.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| customSorting     | essential | If the default sorting was not used for the search result, then please send a true. If you do not pass the parameter, then FactFinder will assume, that the search result was sorted with the default sorting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| additionalInfo    | essential | You may use this parameter to add something to the log entry, such as to enable searching the log for a specific entry. Hint: Contrary to other tracking events `log` events are written into the search log of the corresponding channel. So the entry of a `log` event looks like the entry made by a FactFinder search. In order for the log event entries to be findable in the search logs, the `AdditionalInfo` area contains the entry `ShopCacheHit` (for example, `AdditionalInfo [ShopCacheHit &#124; sid=session1]`). The entries are written into the ASN resp. search log, depending on if the transmitted search result is based on a navigation or search request.                                                                                                                                                                                                                                                                                                                                        |

## REST

The technical documentation of the REST-API is contained in the search application itself and can be accessed via \[your NG server]/fact-finder/swagger-ui.html . It can be also accessed via the following URL:

Swagger Link: <https://ng-demo.fact-finder.de/fact-finder/swagger-ui.html>

The interface offers not only the parameter documentation, but also the option to test a query and review the result. The documentation was created with Swagger, you can use Swagger Codegen to generate a client for it and use it for your code.

Shop Cachehit-event documentation can be accessed via the `log` method in the `tracking` resource.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fact-finder.com/integration/tracking-interface/shop-cachehit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
