-
Notifications
You must be signed in to change notification settings - Fork 198
Lazy loading and caching for attributes set in _loadData(..)
#1510
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
JonnyWong16
merged 33 commits into
pushingkarmaorg:master
from
eliasbenb:feat/lazy-loading-and-caching
Apr 9, 2025
Merged
Changes from 9 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
0806788
feat: Implemented a caching mecahnism for PlexObject classes
eliasbenb 9fe844b
perf: Cache all data attributes that are computation heavy
eliasbenb d8860c9
fix: Don't invalidate property cache on object initialization
eliasbenb c31f7c6
refactor: For all Plex objects, call the base class's loadData functi…
eliasbenb 9d5abc9
perf: Convert attributes that call `findItem` to cached data properties
eliasbenb e8348df
perf: Attempt to parse XML strings without cleaning (which is expensi…
eliasbenb aed1fd9
Revert "perf: Attempt to parse XML strings without cleaning (which is…
eliasbenb da10d35
fix: Use the correct attribute name when deleting invalidated cached …
eliasbenb f976cf0
fix: Follow the same behavior as before the introduction of cached pr…
eliasbenb 526e47b
fix: Typo in declaring cached data property attributes
eliasbenb c3cd373
test: Don't use ` __dict__` to access attributes
eliasbenb 83e6286
test: Don't reload objects for the test_video_Movie_reload_kwargs test
eliasbenb 0ef26ed
fix: Ensure `PlexObject._loadData` is called in child classes that ov…
eliasbenb 4f66a0a
fix: Handle special cache invalidation for LibrarySection objects
eliasbenb 947393d
test: Tests for cache invalidation in library and video objects
eliasbenb 2212c2d
test: Removed unexpected exception from test_library_section_cache_in…
eliasbenb aea4282
test: Replaced incorrect object ID comparisons with string string rep…
eliasbenb 8fa7d13
refactor: Removed uneeded variable assignment
eliasbenb cd2c8f7
perf: Convert languageCodes and mediaTypes to lazy-loaded cached prop…
eliasbenb 6ad68ce
refactor: Delegate cache invalidation logic to the reload function in…
eliasbenb 90bf0fd
style: Removed unecessary explicit object inheritence (implicit since…
eliasbenb 8c91769
perf: Lazy load expensive attributes in PlexSession
eliasbenb ca0b1c8
docs: Make it clearer that Playable, PlexSession, and PlexHistory are…
eliasbenb 88e165f
fix: Handle special reload cache invalidation logic for MyPlexAccount…
eliasbenb 0229729
refactor: Unused import
eliasbenb 28bd9db
style: Reorder functions for more accurate order of operation
eliasbenb 81c16b7
docs: Removed typo
eliasbenb 53364a9
refactor: Fixed all flake8 unused import warning
eliasbenb 65303c2
fix: Invalidate the cache after all PUT queries in the PlayQueue object
eliasbenb 0320360
refactor: Call loadData with invalidation in the Settings class for f…
eliasbenb a06a43f
refactor: Better align the items and reload functions with the intern…
eliasbenb c98a9d1
fix: Reset the state of Hub pagination metadata on reloads
eliasbenb e3fc9c8
docs: Updated docstring for `Hub.reload(...)` changes
eliasbenb 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
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.
Uh oh!
There was an error while loading. Please reload this page.