angular2-smart-table icon indicating copy to clipboard operation
angular2-smart-table copied to clipboard

Add query cache to ServerDataSource

Open uap-universe opened this issue 3 years ago • 0 comments

It looks like the ServerDataSource could use a cache to remember the last query parameters s.t. subsequent calls to

  • getAll()
  • getElements()
  • getFilteredAndSorted()

can return the last result without issuing a new request. On the other hand, there needs to be a way to invalidate this "cache", if you want to obtain fresh data from the server without changing the filter, page, or sorting.

I would override the refresh() method for this. This way you get new data from the server

  • every time the query changes (changing the page or the filter)
  • on explicit calls of refresh()

uap-universe avatar Oct 27 '22 08:10 uap-universe