Skip to content

What are the best practices for lazy loading? #612

Discussion options

You must be logged in to vote

@BubbleGarten @antonmedv A way to do it without patching is to replace all dynamically populated variables by 'getter's. Static variables can be used as is.
Thus, the expression becomes : getFoo() + getBar() + baz. You can have an arbitrary amount of intelligence in the getters to decide whether you want to download content or use a local cache or something else.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@antonmedv
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by BubbleGarten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants