-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
new LookupCache interface (3.0 release) #2456
Comments
Sounds good -- I add this on my WIP list of things. May take a while only as I am furiously trying to close 2.10 functionality, otherwise I think should be quick to go through. |
@cowtowncoder I have a caffeine based cache that will work with jackson 2.9./2.10 - https://github.com/pjfanning/jackson-caffeine-cache/blob/master/src/main/java/com/github/pjfanning/jackson/CaffeineLookupCache.java |
@pjfanning Why not return the results from the |
@ben-manes good point - I had left those lines behind from an earlier iteration |
@pjfanning Neat (wrt Caffeine-based impl). Would be nice to document somehow -- one of many things discussed at some point was that of how to support "Jackson Util" or "Jackson Ext", some form of place to contain helpful implementations, outside of core components but in usable form. For some things could be source go copy, for others small jar. |
So, I merged the PR, but got to thinking on part of how to make things configurable.
So then I realized that maybe, instead of making individual cache things configurable separate, there ought to be something like One secondary benefit would be to sort of document all caches Jackson databind uses. |
I guess it's best to come back to this after the 2.10.0 release is complete. I do favour the idea of being able to set a CacheProvider implementation in the MapperBuilder and us providing a default that uses SimpleLookupCache. |
Yes, agreed. I just wanted to write down broad idea I had, so I won't forget :) |
Created #2502 for the follow-up part. |
Aim is to allow the the type cache implementation to be pluggable.
SimpleLookupCache is the default implementation. Users can write their own implementaions based on other caching frameworks, like Caffeine, if they prefer. Jackson-databind having an interface means that we can have pluggability and not introduce new jar dependencies.
The text was updated successfully, but these errors were encountered: