XF 1.5 What is the purpose of 'search ID' in every search performed on XenForo?

Mike

XenForo developer
Staff member
It's for optimization (searches can be slow and need permission checks) and for consistency (so the results don't change during the search).
 

TheBigK

Well-known member
Thanks a ton for your quick responses.

Is the search ID stored in the Database or in $_SESSION to maintain persistence?
 

TheBigK

Well-known member
Storing the information in database would mean that I can retrieve my search at a later point. Any reason that it's not stored in a global scope like SESSION or COOKIE? Searches are temporary; what's the reason for storing them?
 

Mike

XenForo developer
Staff member
They're cleaned up periodically.

But they store a variety of a data so a cookie would not be appropriate (and they can potentially cross session boundaries, plus you may have multiple searches simultaneously).
 

TheBigK

Well-known member
They're cleaned up periodically.

But they store a variety of a data so a cookie would not be appropriate (and they can potentially cross session boundaries, plus you may have multiple searches simultaneously).
Thanks! This is very interesting! Really appreciate your responses.
 
Top