-
Notifications
You must be signed in to change notification settings - Fork 31
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
Allow disabling of conversion of cache data #122
Comments
Should be checking if conversion is needed before attempting conversion |
@phxql So you understand the root of this behavior. When the map is stored in the cache, any information about its generics are lost. We don't know what the key type or value type of the map is. When we retrieve the map, it is converted to being a |
What if we would allow to define key and value types ? |
Fine for me :) |
This was implemented in the cache module |
@jameskleeh so can the issue be closed? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@jameskleeh can this be closed? |
@alvarosanchez It seems the code wasn't ever merged. See https://github.com/micronaut-projects/micronaut-cache/tree/cache_conversion |
@jameskleeh were you done with it? If so, can you please create a PR? Otherwise, what is left? |
We got hit by this issue as well. Would be nice if this got merged. |
Task List
Steps to Reproduce
@Cacheable
Expected Behaviour
2nd method call is at least as fast as 1st.
Actual Behaviour
2nd method call is a lot slower.
Environment Information
Hi,
the DefaultSyncCache uses the conversion service to convert the stuff coming from the actual cache implementation. The
DefaultConversionService
contains some code which iterates over all the keys from map (because it implements Iterable) and tries to convert them. I'm not sure why it's doing this, but this caused a huge performance hit in our application. We're using the default in-memory caffeine cache.We worked around by wrapping the huge map in an object which doesn't implement Iterable and now it's fast again.
The text was updated successfully, but these errors were encountered: