ajax, DT row cache, deferRender, serverSide.. looking for other recipes
ajax, DT row cache, deferRender, serverSide.. looking for other recipes
Hi,
to sum up Im looking for compromises/complementarity between serverSide and pure DT search/filter/paging methods.
This is a question about serverSide and DT cache system, related to this documentation :
https://datatables.net/examples/server_side/pipeline.html
(first thanks for this page it's a really useful ressource )
Here is my question
at some point after several new page/new order/filter ajax requests, there is chances that many element have been cached one time then called again and again.
provided the table elements use a rowID, did you ever build a cache system taking the rowid into account ?
server would send an ordered list - I mean a simple array, sorry, pythonist here - of row id + a dictionary of elements with rowid as key - only with the new element unkown from dT, then DT would add new elements in its cache and draw the table according to the ordered list, using the cached data of each row id key of its dict.
server and DT need to care about what has been already sent and received. Maybe some ajax keywords to check/resync.
At some point server only send an ordered list and/or DT stops ajax calls and filter/search/page as if serverSide was off.
seems a bit tricky, but feasible .. ?
or alternatively :
Once DT has draw the first page after its first ajax request so the 1st the page is available to user, I'd like DT to trigger requests regularly, by lots, and cache it in foreground until it has received the total number of elements. and user can browse meanwhile, unaware of this polling.
in this case serverSide would be off (can this be switched on some event ?) and filter/search would be freezed / pager would be updated before durig this phasis.
Thanks for any pointers about this kind of need
jerome