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

Remove the Parser cache #462

Merged
merged 1 commit into from
Jan 31, 2020
Merged

Remove the Parser cache #462

merged 1 commit into from
Jan 31, 2020

Conversation

sirosen
Copy link
Collaborator

@sirosen sirosen commented Jan 24, 2020

Because the cache is no longer used field-by-field to fetch data, there's significantly less value in keeping it. Combined with the fact that each parser instantiation was already clearing the cache to avoid a security bug ( #371 ), the cache is no longer actually used at all in most (any?) contexts.

Remove the cache and all of the machinery associated with it (Parser._clear_cache, Parser._clone, and relevant checks).

Resolves #374


If there's some case I'm not aware of in which the cache is really useful, that's fine. But based on my reading, I don't think it really does anything anymore, so I'm proposing its removal.

@lafrech lafrech added this to the 6.0.0 milestone Jan 25, 2020
@lafrech
Copy link
Member

lafrech commented Jan 30, 2020

I think this is good to merge to. Do you mind doing the rebase?

@sirosen
Copy link
Collaborator Author

sirosen commented Jan 30, 2020

Not at all. I'll have it done in just a second.

Because the cache is no longer used field-by-field to fetch data,
there's significantly less value in keeping it. Combined with the fact
that each parser instantiation was already clearing the cache to avoid
a security bug ( marshmallow-code#371 ), the cache is no longer actually used at all
in most (any?) contexts.

Remove the cache and all of the machinery associated with it
(Parser._clear_cache, Parser._clone, and relevant checks).

Resolves marshmallow-code#374
@lafrech lafrech merged commit d83ee79 into marshmallow-code:dev Jan 31, 2020
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.

Re-factor cache invalidation
2 participants