We have customized SXA search in our project. There are few predicates from
Sitecore.XA.Foundation.Search dll used.
To enhance the performance I was trying to cache query to avoid database latency (since data hardly change) and suddenly
PageOrMediaPredicate predicate stopped fetching data. I reverted my changes and it worked again.
There is something wrong when I get query from cache. I am completely blank about what that predicate does. I went to declaration (in meta) but there is no comment explaining it. I literally found only one page in google search this predicate and that doesn't explain it either. Do someone know what these predicates are?
As a new Sitecore developer I don't know where to find explanations for such thing, is there any developer's guide available where they have explained all libraries?
Update If I debug the query that is fetching data from cache it shows same number of results but where
query.WherePageOrMediaPredicate(searchQueryModel.Site)) is called, it gives no data.
searchQueryModel.Site is null in both cases, when it works and when it doesn't.