Redis as Hibernate second level cache

后端 未结 6 1093
悲哀的现实
悲哀的现实 2021-01-30 11:19

I have a crazy idea : use Redis as hibernate second cache level. Redis is an in-memory datastore, it supports replication, pipeline, etc.. The goal is to share the hibernate cac

6条回答
  •  一生所求
    2021-01-30 11:56

    I think it's a cool idea. Here is some code to get you started

    In Grails, for example, Redis is a plugginable backend instead of Hibernate, and unless you really need that Hibernate complexity, I think instead would be the right way to go.

    But having an ability to keep those Hibernate entities in Redis ( e.g. via JRedis ) would also be nice in case that (Hibernate) complexity is truly needed.

提交回复
热议问题