RobertoPrevato / KingTable

Library for administrative tables that are able to build themselves, on the basis of the input data.
MIT License
68 stars 17 forks source link

Disable Caching or reduce refresh #16

Closed angujo closed 6 years ago

angujo commented 6 years ago

Hi, I am a newbie here, and want to use this library for a project am engaged in. Currently am working on the data on Development and the caching is getting on my nerves, as the table seem not to change as fast as am testing out the properties sent from server. Continuously getting the error below, believe it has something to do with cached data;

image

Have set the options as below;

 storeTableData: false,
                lruCacheMaxAge: 1,
                lruCacheSize: 1

but seem to take forever or not at all to clear.

Quick assistance will be appreciated. Thanks for the good work so far.

RobertoPrevato commented 6 years ago

Hi @angujo, sorry for the inconvenience, this looks like a bug.

You can disable the storage completely by overriding a function called getDataStore.

This can be done using a second object in the table constructor, for example:

new KingTable({}, { getDataStore: function () {} })

Or overriding this function using ES6 syntax, or classic prototype manipulation:

KingTable.prototype.getDataStore = function () {};

Please let me know if this solves the issue you are experiencing.

angujo commented 6 years ago

Hi @RobertoPrevato ,

Really great-full for the quick response. Sure it assisted, I also set the lruCacheSize=0 which I believed disabled caching and will increment it as I test the caching.

Great, lite plugin.

RobertoPrevato commented 6 years ago

Thanks @angujo, I'm happy that my library is helping. Unfortunately I don't have much time to dedicate to it, since in my private time I worked on different things lately. But in the future I will extend it with other features (such as support for continuation tokens for collection whose size is unknown - case of Azure Storage Table Service, for example).