diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java index 139612517e..7a52b0ef95 100644 --- a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java +++ b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java @@ -496,6 +496,9 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> { Range newUsefulData = partition[1]; if (!newUsefulData.isEmpty()) { + if (!cached.isEmpty()) + discardStaleCacheEntries(); + // Update the parts that are actually inside int start = newUsefulData.getStart(); for (int i = start; i < newUsefulData.getEnd(); i++) { @@ -515,7 +518,6 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> { if (cached.isEmpty()) { cached = newUsefulData; } else { - discardStaleCacheEntries(); /* * everything might've become stale so we need to re-check for |