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

Limit size of SerializerCache, auto-flush on exceeding #1994

Closed
cowtowncoder opened this issue Apr 11, 2018 · 2 comments
Closed

Limit size of SerializerCache, auto-flush on exceeding #1994

cowtowncoder opened this issue Apr 11, 2018 · 2 comments
Labels
Milestone

Comments

@cowtowncoder
Copy link
Member

(note: offshoot of #1905)

Currently size of serializer cache is not bounded: this is something that goes against the cardinal rule of caches ("never use unbounded caches for unbounded domain").
This needs to go in 3.0 because tweaks to caching are generally high-risk changes.

@cowtowncoder
Copy link
Member Author

One note: default maximum size is 4000, which should be sufficient for most uses.
Value could be made configurable (either explicitly, or by allowing cache instance to be constructed as part of building of mapper) but for now it is most important to add some bound.

@cowtowncoder
Copy link
Member Author

Could consider backporting in 2.10, but would need more work with interaction between SerializerCache and ReadOnlyClassToSerializerMap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant