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

Caching SVG doesn't cache CSS class name and Viewbox settings #67

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

drpeck
Copy link
Contributor

@drpeck drpeck commented Sep 29, 2023

There is an issue where caching an SVG with a class name (or Viewbox setting) causes the class name to be contained in the cache. If outputting the same SVG later includes the class name from the first usage.

This PR splits the caching so that the file read is independently cached from the Css class name and Viewbox settings.

@drpeck
Copy link
Contributor Author

drpeck commented Sep 29, 2023

Honestly, I'm pretty confident about this PR but it shouldn't be merged yet. I'm not sure how best to test it. The unit tests all pass but I failed to create new unit tests as I couldn't work out how to mock the AppCache correctly. Any ideas how to do this? Do you also have an existing method of testing this on a 'real' site, or should I work something out for that?

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.

None yet

1 participant