本文介绍了写入缓存Ehcache后面的新功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找关于如何在ehcache中使用这个新功能write-behind-cache的指南/文档/教程?在Spring + jpa + ehcache + hibernate中有没有演示?

只是为了clariyfing,write-behind-cache意味着每次我们坚持实体时,它会写入缓存而不是数据库正确?

解决方案

Ehcache提供Write-Behind Caching这一事实 NOT 意味着任何使用和Hibernate一样,Ehcache可以不加修改地利用它。从(请注意,这是一个非独立帖子即亲缓存):

换句话说,后置缓存并不是Hibernate目前的工作方式(我可能错了,但我认为这不会发生在不久的将来改变)。但请随时提出问题:)


i looking for guide/document/tutorial on how to use this new feature write-behind-cache in ehcache? Is there any demo in spring+jpa+ehcache+hibernate?

just to clariyfing, write-behind-cache mean each time we persist entity, it will be written into cache rather than into database correct?

解决方案

The fact that Ehcache offers Write-Behind Caching does NOT mean that any piece of software using Ehcache, like Hibernate, can leverage it without modification. From Terracotta's Hibernate Integration (note that this is a non independent post i.e. pro caching):

In other words, write-behind caching is just not how Hibernate currently works (and I may be wrong but I don't think this is going to change in a a near future). But feel free to raise a Jira issue :)

这篇关于写入缓存Ehcache后面的新功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 12:32