【问题标题】:Get region_prefix to work with redisson-hibernate-53 L2 cache获取 region_prefix 以使用 redisson-hibernate-53 L2 缓存
【发布时间】:2020-11-26 02:47:04
【问题描述】:

我正在尝试将 Redis 配置为使用 Redisson(Spring 2.3.0、Hibernate 5.4.15、redisson-hibernate-53)的 Spring Boot 应用程序的 Hibernate 的 L2 缓存。

应用 YAML 在 spring.jpa.properties.hibernate 下有这个部分

        cache:
          use_second_level_cache: true
          region.factory_class: org.redisson.hibernate.RedissonRegionFactory
          region_prefix: app1
          redisson:
            config: redisson.yaml
            fallback: true

除 region_prefix 外,一切正常。 在 redis-cli 中运行 KEYS * 的响应显示主键是我的 Cacheable 实体的完全限定类名,但它没有区域前缀。 我在 RedissonRegionFactory 和 Hibernate 的 RegionNameQualifier 的相关代码中看不到任何引用。

有没有人解决这个问题或者是一个错误?

【问题讨论】:

    标签: hibernate caching redis redisson


    【解决方案1】:

    你无法让它工作。我打开了一个问题,他们立即修复了它。它将与Redisson 3.13.7一起发布。 Redission 忽略了缓存区域前缀。

    issue

    【讨论】:

      猜你喜欢
      • 2012-07-22
      • 2017-05-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-04
      • 2013-02-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多