If you cache search requests on your server, the API won't be able to create a unique queryID
and associate it with a userToken
. This can negatively affect your Algolia analytics metrics and effectiveness of Algolia's AI features like Dynamic Re-Ranking and A/B Testing. This is because these features depend on the userToken
from the search aggregates, not the one sent with events, for deduplication purposes.
During aggregation, events are joined to a search using the queryID
, and the userToken
from the search is retained, while the one from the event is discarded. As a result, all events tied to the same queryID
are treated as coming from a single userToken
—the one from the original search.
If you want to take advantage of Algolia's Search Analytics and our AI-driven features to optimise your users' search experience, then the use a cache mechanism is not recommended.