Skip to content
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

Provide a caching option for the @query decorator #1013

Closed
sorvell opened this issue Jun 4, 2020 · 0 comments
Closed

Provide a caching option for the @query decorator #1013

sorvell opened this issue Jun 4, 2020 · 0 comments

Comments

@sorvell
Copy link
Member

sorvell commented Jun 4, 2020

Description

Savvy users know that the @query decorator crawls the DOM on each access looking for a matching element. If these users are concerned about performance, they are inclined to access the property once and memoize it into another property. This kind of defeats the purpose of having the property in the first place.

However, sometimes it's important that the result of is dynamic. We can address both use cases by adding a caching option to the decorator, something like @query({cache: true}).

Acceptance criteria

Enhancement landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant