Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我从 xml 切换到以编程方式创建缓存,现在我无法按名称检索我的缓存。
这是一个代码片段,显示了我在做什么也许你可以发现一个明显的错误?
http://gist.github.com/405546
(我在这里只显示相关行)。
这表示您认为缓存管理器可以使用名为 default 的缓存,但事实并非如此。您发布的任何代码都没有显示默认缓存是如何建立并添加到缓存管理器的。
刚刚发现如何使它工作,经过反复试验。
请参阅更新的要点。
这种 ehcache 行为是反直觉的。