sEcho and OutputCache on MVC

sEcho and OutputCache on MVC

SelborSelbor Posts: 2Questions: 0Answers: 0
edited September 2013 in General
I'm implementing a little application on MVC 4, using DataTables Plugin.
Everything goes right until I try to specify what request to cache.
If I tell the application to cache by IDisplayStart,IDisplayLength and sSearch, it works but when trying to revisit a table page,
it stops working, as the sEcho provided and the sEcho returned by the server are not the same.
If I added sEcho to the parameters, it would basically mean caching one object per page browsed.

Is there any way to ignore the sEcho parameter and render the table anyways.

Thanks a lot,
Gabriel.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You can just not include sEcho in the return. Not recommended since responses can be out of sequence, but its probably the only option for you.

    Relevant part of the DataTables code: https://github.com/DataTables/DataTables/blob/master/media/js/jquery.dataTables.js#L2097

    Allan
  • SelborSelbor Posts: 2Questions: 0Answers: 0
    Thanks a lot allan.
This discussion has been closed.