Pagination Cache Plugin

Pagination Cache Plugin

theConartisttheConartist Posts: 14Questions: 3Answers: 0

Hi,

I was wondering if there is an available option/plugin that enables browser caching of loaded pages/rows.

I was thinking of implementing an ajax pagination but wanted to keep the viewed pages as hidden, 1. for performance, 2. i'm rendering input fields to each row and need to access them on submit.

Is there something available?

Thanks.

Answers

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    Like this?

    Allan

  • theConartisttheConartist Posts: 14Questions: 3Answers: 0
    • is this compatible with dt 1.10?
    • would this plugin be able to cache all visited pages?
    • can i access hidden cached rows' input fields?

    thanks.

  • theConartisttheConartist Posts: 14Questions: 3Answers: 0

    and how do i merge this implementation with mine. im currently using the fnServerData for my ajax request

  • theConartisttheConartist Posts: 14Questions: 3Answers: 0

    i am currently using jquery 1.10.2 and datatables 1.10.0. i can't really upgrade them right now

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    is this compatible with dt 1.10?

    That page uses DataTables 1.10, so yes.

    would this plugin be able to cache all visited pages?

    No - it caches a set number of pages. For example page display is 10 - it will request the data for 5 pages total and hold them. It isn't a full cache in the sense of if a page has been seen once, a request for it would never hit the server again. You would need to write the code to do that if that is what you wanted.

    can i access hidden cached rows' input fields?

    Using server-side processing you can't. Regardless of this plug-in or any other. Server-side processing means that each time a row is displayed new nodes are created for it.

    and how do i merge this implementation with mine. im currently using the fnServerData for my ajax request

    You'd need to modify the Ajax request that the plug-in makes.

    Allan

  • theConartisttheConartist Posts: 14Questions: 3Answers: 0

    thanks for the response. after a couple of hours of tinkering, i still couldn't achieve what i wanted.

    I was wondering how the rows().nodes() are populated. i was aiming for this. that i would want to cache the actual rows instead of the data of the rows.

    i think a modification of the rendering of rows. fnCallback contains _fnAjaxUpdateDraw, i was wondering what you are using for the non-ajax datatable to render the next rows and hide the previous rows

  • allanallan Posts: 63,552Questions: 1Answers: 10,477 Site admin

    The internal _fnAddRow and _fnCreateTr functions are the key to adding new rows. Externally you can use row.add() to add a new row using an existing node (for example from a cache), but row.add() is a client-side function and therefore is useless with server-side processing.

    There basically is no external way to cache the nodes with server-side processing enabled. The _fnCreateTr function is where you would start if you want to modify the source to add that ability.

    Allan

This discussion has been closed.