ehcache persist to disk issues

后端 未结 8 1781
你的背包
你的背包 2020-12-23 14:30

I want to do something with ehcache in Java that I think should be extremely simple, but I\'ve spent enough time frustrating myself with the docs...

  1. Write a

8条回答
  •  我在风中等你
    2020-12-23 15:09

    I suppose this will work, but I still wonder why programatically defined caches can't persist on disk (especially since they are still written to disk!)

    My understanding is that a programmatically created cache (i.e. not declared in ehcache.xml) can use a DiskStore that can itself be persistent but this doesn't mean that this cache will be loaded automatically by the CacheManager uppon restart. Actually, I don't think the previously mentioned files do contain the cache parameters.

    But, if you "recreate" the cache programmatically with the same parameters, you'll find the previously cached entries back from the DiskStore.

提交回复
热议问题