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

Support for typed caches with EhCache 3.0 [SPR-14384] #18957

Closed
spring-projects-issues opened this issue Jun 20, 2016 · 6 comments
Closed

Support for typed caches with EhCache 3.0 [SPR-14384] #18957

spring-projects-issues opened this issue Jun 20, 2016 · 6 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: invalid An issue that we don't feel is valid

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jun 20, 2016

Sebastian Audet opened SPR-14384 and commented

There is incomplete support for the EhCache JCache solution.

If you create a CacheManager with typed key/value pairs (pass in the key class and the value class), the spring JCacheManager will fail to instantiate this cache.

The solution is to add support for a custom class map for value pairs.

I have a working patch, will submit for review later.


Affects: 4.3 GA

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

4.3.1 is due quite soon so I'd appreciate a more complete description of the problem. You surely have a cache configuration and a stacktrace to share. Thanks!

@spring-projects-issues
Copy link
Collaborator Author

Sebastian Audet commented

Yup, probably won't share till later this evening though, @ work atm.

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

Sebastian Audet please update the description with your configuration, your method annotation and the stacktrace. Obviously, a sample that reproduces the issue would be much better.

@spring-projects-issues
Copy link
Collaborator Author

Louis Jacomet commented

I believe your issue comes from multiple factors:

  • Spring Caching does not have support for typed caches
  • JCache mandates that CacheManager.getCache(String name) throws when a cache has been configured with a key or value type that is different than Object
  • JCache lacks an API for cache type discovery although there is the JMX workaround discussed in that issue.

Given all of that, when using Ehcache 3 with the Spring Cache / JCache support, you must use untyped caches and there is not much Spring could do to improve the situation.

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

Sebastian Audet some feedback on why you've created this issue in the first place would be very helpful.

@spring-projects-issues
Copy link
Collaborator Author

Stéphane Nicoll commented

Given the lack of answer, I am flagging this one as pending for closure. I'll make sure to update the doc about typed cache in any case.

@spring-projects-issues spring-projects-issues added status: invalid An issue that we don't feel is valid type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues removed the type: enhancement A general enhancement label Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

2 participants