mrocklin / ball

Working notes for Fantasy Baseball
0 stars 1 forks source link

Support caching in dataTables ajax call #10

Closed mrocklin closed 11 years ago

mrocklin commented 11 years ago

In https://github.com/mrocklin/ball/commit/20d1031b14a386d1942dc607798b514369db39e9 I had to set a hard-code a field deep within DataTables. This is a hack and not maintainable.

In http://stackoverflow.com/questions/18051088/allow-server-side-caching-in-fnserverdata-in-datatables someone suggested overriding the fnServerData callback.

mrocklin commented 11 years ago

Fixed.

eigenhombre commented 11 years ago

How / where did you fix this?

mrocklin commented 11 years ago

Originally in e6ab2b55090541941599d7ba88d380b2464d0e2b . But since then I ditched dataTables' built-in ajax system and just rolled my own. In this case I think their extra machinery wasn't worth the added layer of abstraction. The straight ajax + DataTables.delete/addData methods is quite simple.