Reputation: 2566
Currently I am using ASP.NET MVC 4 and jqGrid with server-side paging. The issue I am facing is that the data source come from a third-party web service and I need to implement server-side paging over the result retrieved from the above-mentioned service. Since I should follow the stateless nature of MVC, I am a bit reluctant to use Session or Cache. Your suggestions is much appreciated!
Upvotes: 0
Views: 414
Reputation: 11177
Check if your service provider is supporting OData. If yes, then you need to look at it and it solves your question on completely different way.
Cache and Session do not exist in the same context. Session is bound to a single user, while Cache is shared for all users. It really depends whether the data coming from the web service is unique to each user or it is all the same for everyone. If it is the same, then cache is optimal as using session in that case would just eat your server memory with duplicate data.
If your data is not in extremely large amounts, you might even store it on client-side by rendering table and then using table2grid provided by jqGrid.
Upvotes: 1