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

Cleanup StringBuilderCache #417

Merged
merged 3 commits into from
Apr 18, 2020
Merged

Conversation

KrisVandermotten
Copy link
Contributor

StringBuilderCache used to inherit from DefaultObjectCache<StringBuilder>, and instances were being passed around.

However, nobody was actually using those instances, with one exception: CodeInlineParser.

All other code uses StringBuilderCache.Local(). As it turns out, there is actually no reason why CodeInlineParser could not do the same.

This PR changes StringBuilderCache to be a static class, no longer inheriting from DefaultObjectCache<StringBuilder>. All references to instances are removed. CodeInlineParser was modified to use StringBuilderCache.Local() as well.

It goes without saying that this is a breaking change, as the class and most of the instance references were public.

Copy link
Collaborator

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

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

LGTM

@xoofx
Copy link
Owner

xoofx commented Apr 18, 2020

Sorry, the CI on master was broken and it should be fixed now. Could you rebase/merge master to your branch please? Thanks!

@xoofx
Copy link
Owner

xoofx commented Apr 18, 2020

Can you fix the conflicts?

@xoofx xoofx merged commit 47c6c49 into xoofx:master Apr 18, 2020
@xoofx
Copy link
Owner

xoofx commented Apr 18, 2020

Cool, thanks!

@KrisVandermotten KrisVandermotten deleted the StringBuilderCache branch April 18, 2020 16:24
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