Can disabled cache in render ?

Can disabled cache in render ?

SuiteProGSuiteProG Posts: 26Questions: 3Answers: 0

Hello,

Like in my sample : https://jsfiddle.net/SuiteProG/obL647z9/6/ the render function is call many times but work look like a cache is enabled.
Can I disabled cache for each call in render function write in my columns ?

In my sample, my column is hidden at 11:21:00. If show column at 11:22:00, the content of column will be 11:21:00. So I want write 11:22:00, like my render function return when showing column.

Is it possible ?

Thanks,

SuiteProG

Replies

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @SuiteProG ,

    Yep, the columns.render function caches those values for fast lookup. There's two things you can do, use column-visibility to invalidate those cells in that column (see example here). Alternatively, use drawCallback or rowCallback to redraw, but this will also be called whenever you search/page/order so is likely to be less efficient.

    Cheers,

    Colin

  • SuiteProGSuiteProG Posts: 26Questions: 3Answers: 0

    Hi colin, thanks for your reply.

    Your sample link is it correct ? I have the impression is it my link.

    Cheers,

    SuiteProG

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    That was interesting, I had the tab open still with the same URL but loading it again reverts back to yours. Hopefully this will do the trick here: https://jsfiddle.net/v2jnpam5/

This discussion has been closed.