开发者

What is the best way to "cache" frequently changing search results

I'm am currently developing an ASP.NET intranet application. One of the features of this application allows users to search for items in order to manage them (edit, delete etc).

Currently I am not using any kind of caching (since the search results change so frequently); however, when the user's search results in around 4 thousand items, it takes the system almost 13 seconds to return. Because the search results are not being stored between page reque开发者_如何学运维sts, it is going to take 13 seconds for the page to process for any postback done on the page (sorting, paging, ...anything) .

I have been doing research on ASP.NET caching but I don't think that it is really meant for the purpose of caching results that are frequently going to be changing.

What I'd like to know is what is the best way to cache/store my search results?

Session? (It's already getting bloated with other data...)

Thanks for sharing your thoughts,

-Frinny


Sounds more like you have two problems.

Taking 13 seconds to return a result is way too long. You need to optimize that query and get it down to a sub-second response.

Secondly, you're returning too many items. Nobody will page through 4,000 items, if they are searching. Instead, if they get that large of a resultset, they should be refining their search criteria.


You don't want to show invalid data. Your best bet is to stick with paging and use AJAX to make quick hits to the server to grab the next page.


caching frequently changing data for me too doesn't seem to sound good,use proper indexing and paging to low down the overhead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜