GeezerVison is showing github.com — fix: cache example no longer wip · Bhavdip/Android-RxJava@d7c5f4e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +6-6Lines changed: 6 additions & 6 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -84,19 +84,19 @@ Note that the `Func3` function that checks for validity, kicks in only after ALL |
84 | 84 |
|
85 | 85 | The value of this technique becomes more apparent when you have more number of input fields in a form. Handling it otherwise with a bunch of booleans makes the code cluttered and kind of difficult to follow. But using `.combineLatest` all that logic is concentrated in a nice compact block of code (I still use booleans but that was to make the example more readable). |
86 | 86 |
|
| 87 | +### Retrieve data first from a cache, then a network call - using [`.concat`](http://reactivex.io/documentation/operators/concat.html) |
87 | 88 |
|
88 | | -## Work in Progress: |
| 89 | +Using concat, you can retrieve information from an observable first (presumably this one is fast like retrieveing from a disk cache) and show preliminary data to a user. Subsequently, when the longer running 2nd observable is complete (say a network call), you can update the results on the interface using the latest information. |
89 | 90 |
|
90 | | -Examples that I would like to have here, but haven't found the time yet to flush out. |
| 91 | +For the purposes of illustration i use an in-memory `List` (not an actual disk cache), then shoot out a real network call to the github api so it gives you a feel of how this can really be applied in production apps. |
91 | 92 |
|
92 | | -### Retrieve data first from a (pseudo) cache, then a network call - using [`.concat`](http://reactivex.io/documentation/operators/concat.html) |
93 | 93 |
|
94 | | -Using concat, you can retrieve information from an observable first (presumably this one is fast like retrieveing from a disk cache) and show preliminary data to a user. Subsequently, when the longer running 2nd observable is complete (say a network call), you can update the results on the interface using the latest information. |
| 94 | +## Work in Progress: |
95 | 95 |
|
96 | | -For the purposes of illustration i use an in-memory `List` (not an actual disk cache), but shoot out a real network call to the github api so it gives you a feel of how this can really be applied in production apps. |
| 96 | +Examples that I would like to have here, but haven't found the time yet to flush out. |
97 | 97 |
|
98 | 98 |
|
99 | | -### Pagination (wip) |
| 99 | +### Pagination |
100 | 100 |
|
101 | 101 | a. Simple pagination |
102 | 102 | b. Optimized pagination |
|