angular2-smart-table
angular2-smart-table copied to clipboard
Add query cache to ServerDataSource
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()