Skip to content

Fix poor in-memory cache performance due to accidental mutation of global object used in cache keys#313

Open
sentience wants to merge 1 commit into11ty:mainfrom
sentience:fix-global-options-pollution-v7
Open

Fix poor in-memory cache performance due to accidental mutation of global object used in cache keys#313
sentience wants to merge 1 commit into11ty:mainfrom
sentience:fix-global-options-pollution-v7

Conversation

@sentience
Copy link

Creates a new default options object whenever one is needed, to avoid inheriting mutations to a single global object that is reused for multiple images.

Fixes #312

Note: I've also prepared a fix for v6 (the current general availability version of this package) here. If a maintenance branch for v6 is created, I'm happy to open a separate PR to contribute this fix to the current version.

Creates a new default options object whenever one is needed, to avoid inheriting mutations to a single global object that is reused for multiple images.

Fixed 11ty#312
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Unwanted cache key mutation causes poor build performance

1 participant