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

feat: Introduce CacheClearer to force-clear static caches #532

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

robmaceachern
Copy link
Member

@robmaceachern robmaceachern commented Dec 16, 2024

Allows clients to force-clear the static caches used in Blueprint. This intended as a stop-gap solution (famous last words, I know) until work is done to scope the cache lifetimes more appropriately.

@robmaceachern robmaceachern marked this pull request as ready for review December 16, 2024 21:53
@robmaceachern robmaceachern requested a review from a team as a code owner December 16, 2024 21:53
Copy link
Collaborator

@kyleve kyleve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to clear out / replace any static prototype views as well? (Eg, in AttributedLabel?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(commenting here for threading purposes)

@kyleve:

Do we need to clear out / replace any static prototype views as well? (Eg, in AttributedLabel?)

Great question! When I was discussing this with @watt last week we both agreed that the AttributedLabel prototype view is probably ok as-is. It should be updated frequently enough in regular usage that even in the unlikely case it is momentarily retaining something somehow (I guess through a a11y closure?) it'll get freed up pretty quickly.

Happy to deal with it too, though! If it was in the same module I'd just reset the prototype but I can't reach it from BlueprintUI.

If we end up exposing a wrapper in Market for these cache clearing things we could always just measure an empty label there too.

Copy link

@johnnewman-square johnnewman-square left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Providing clients the ability to manually clear the cache feels like a good stop-gap that we can build on top of going forward.

@robmaceachern robmaceachern merged commit 1358124 into main Dec 18, 2024
5 checks passed
@robmaceachern robmaceachern deleted the robmaceachern/cache-flush branch December 18, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants