-
-
Notifications
You must be signed in to change notification settings - Fork 45
Cache and Lazy-Load Modifications #2928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
2518b23
Adds a worker task to prime entity cache
shubham1g5 878c09c
Schedule prime cache task after 412 and on initializing user session
shubham1g5 c1e6a35
Set up progress indicator on entity list screen
shubham1g5 9aa1220
Creates a Android specific async factory to bind to any existing prim…
shubham1g5 c4a68a6
Move methods to schedule/cancel cache work to cache helper
shubham1g5 d78960d
Re-schedule cancelled work when expediting a detail sepcific cache
shubham1g5 dd05545
Improve progress tracking by providing information on individual enti…
shubham1g5 acd3aa6
Handle for new cache config while initiating entity factory
shubham1g5 7122c92
Cancellation handling
shubham1g5 63743aa
Always clear state after prime cache worker run
shubham1g5 ede6caf
correct eval context by including command id
shubham1g5 f145dd6
Fixes progress tracking plus tracking the live worker in async task
shubham1g5 8b53cbf
Uses datum id to track progress instead of detail as a detail can pot…
shubham1g5 1e8dfd3
Thread safety
shubham1g5 32d554e
lint
shubham1g5 90b0c96
Make clear distinction in between old and new cache and index switch
shubham1g5 ab5d325
Priming cache for normal and sort values for the detail fields marked…
shubham1g5 6c9be03
Tweaks
shubham1g5 dbbcfd4
fixes test dependent on work manager init
shubham1g5 15cf20a
use a % indicator for progress
shubham1g5 7198161
Adds init validation for new android async factory
shubham1g5 aa65ba4
Bind PrimeEntityCacheHelper to CommCareApp lifecycle
shubham1g5 7860093
Only provide progress updates for new cache config
shubham1g5 55c8b2b
fixes cache priming bugs
shubham1g5 5726518
Use livedata/stateflow based observers for traching prime cache progr…
shubham1g5 d6dcfed
Lazy loading tweaks, introduces a flag to skip lazy loading in backgr…
shubham1g5 b24d580
Better status message
shubham1g5 6deec22
rename skipLazyLoad -> inBackground, better logic to calculate uncach…
shubham1g5 f1c9a26
optimize -> cache_enabled
shubham1g5 bab015c
Refactor inBackground as a constructor param to entity factory
shubham1g5 7530f94
reword progress message
shubham1g5 99329d3
uniformly use getCurrentAppId() when dealing with work manager
shubham1g5 89a054f
key prime cache request with app id
shubham1g5 0e7d208
Merge branch 'master' into primeCacheAheadOfTime
shubham1g5 b73d40e
Adds is_dirty and is_shallow columns to entity cache table and insert…
shubham1g5 bd45ea8
abstract to getAllOwners [no op refactor]
shubham1g5 bcf637c
Adds shallow records to cache and propogate them as dirty records in …
shubham1g5 630ec83
blocks cache priming to process shallow records as the first thing
shubham1g5 1a985d8
Test to verify cache invalidation
shubham1g5 1fd858f
rename method
shubham1g5 1f04887
schedule entity cache invalidation task after restore
shubham1g5 137251a
error handling
shubham1g5 6b57655
fix for workmanager initialization issues in test
shubham1g5 b6668b9
Skip cache invalidation for demo user to get past a weird robolectric…
shubham1g5 be42905
removed un-necessary demo user check and adds a more useful check on …
shubham1g5 867c254
schedule entity cache invalidation after form upload has finished, ch…
shubham1g5 78f2e5d
correct transaction calls
shubham1g5 4d1e04b
get db lock before processing shallow records
shubham1g5 fdcabfc
Avoid un-ncessary String conversion
shubham1g5 a3bd499
Correct method access, minor lint cleanup
shubham1g5 23836b6
use bulk query method
shubham1g5 190cf05
Better method names and docstring
shubham1g5 0c7268f
Merge pull request #2955 from dimagi/cacheExpirationChanges
shubham1g5 d1c9089
Only observe cache worker when caching is on
shubham1g5 e27a912
Correct bulk fetch of records ids
shubham1g5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the refactor, I think this coupling will make a lot of sense and keep things straight