RobertoPrevato/KingTable

Disable Caching or reduce refresh

Closed this issue · 3 comments

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.

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.

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.

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).