views:

554

answers:

1

Would using linqs deferred loading be preferred when implementing pagination? or should i cache the results and make repeated calls to it as the page is selected? When the cache refreshes, I will reload the results, but the results may change and thus the pages with it.

+2  A: 

I guess it depends how much data you expect to have and how often users will be paging through all of it. If there will be very many rows, then it would probably be best to use paging in your query to prevent having to load a huge data set on the initial page load. If there will not be too much data, then using the caching method wouldn't hurt too much on the initial page load and it would speed up subsequent loads over having to requery the database.

CodeMonkey1