I have an MVC3 web app that represents about a dozen different entities, but I have built a common search function so that the user can do a single search and get results from the various entities. It works fine, but as I suspected, the performance is slow because the search is occurring live and there's a lot to search. A cache would be fine even if it was a long one (daily even), but I don't know where and when to actually refresh the cache. If a person uses the search when it's been longer than the cache timeout then it will be really slow for them that one time and that's not acceptable. I'm thinking that I have to have a Windows service in place or something that builds the cache, but perhaps there's a better way that I don't know about. I can't do it entirely in the database because some of the entities don't exist in the database (one entity list is composed by searching through some files on the system for instance). Any help is appreciated.
View Complete Post