Try our conversational search powered by Generative AI!

How compare criterions and values in two Community Queries?

Vote:
 

Hello,

I have a case here where I'd like to compare, for instance, two TopicQuery instances and see if they contain the same criterions and values for these criterions, basically see if the queries ask for the same kind of information from EPiServer Community. Does anyone here have any idea about the best way of doing this?

Best regards

Martin

#37359
Mar 03, 2010 17:39
Vote:
 

Hi,

 

The method EPiServer.Common.Queries.QueryHandler.RemoveQueryResultCache (in EPiServer.Common.Framework.Impl) clears a cache key based on a query instance (looking at all the set criterias, values and sorting order).

Maybe this could be a starting point for further investigation?

 

/Håkan

#37407
Mar 04, 2010 17:21
Vote:
 

Thanks a lot Håkan, that seems to be exactly what I've been looking for.

I'm trying to develop a nice way to clear the Query cache on demand (when AddEntry happens for instance) without having to manually add code to clear it "everywhere" in our code where AddEntry happens using Aspect oriented programming and this was the last piece needed to the puzzle :-)

Happy easter

/Martin

#38200
Apr 01, 2010 15:45
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.