Skip to content

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

Closed

Description

@spring-projects-issues

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:

Activity

  1. spring-projects-issues commented on Jun 21, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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!

  2. spring-projects-issues commented on Jun 21, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Sebastian Audet commented

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

  3. spring-projects-issues commented on Jun 23, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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.

  4. spring-projects-issues commented on Jun 25, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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.

  5. spring-projects-issues commented on Jul 4, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Stéphane Nicoll commented

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

  6. spring-projects-issues commented on Jul 21, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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.

  7. added
    status: invalid
    type: enhancement
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: corestatus: invalid

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions