Repository navigation
JSPWIKI-1371 Give each caching manager its own Ehcache cache manager - #642
Open
arturobernalg wants to merge 1 commit into
Open
arturobernalg wants to merge 1 commit into
arturobernalg wants to merge 1 commit into
Conversation
The caching manager used the CacheManager singleton of Ehcache, so every engine of the same class loader shared the caches of the others, and shutting down one engine shut them down for all. A page saved by an engine that is still running, like the one in ImageTest, showed up in the search results of another engine, and this made SearchManagerTest and PageRenamerTest fail at random. Each caching manager now creates and shuts down a cache manager of its own.
Contributor
|
i'm not convinced this will fix the issue with the portable build due to the classloading issue. edit: just saw the other PR. this one is fine too |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The caching manager used the CacheManager singleton of Ehcache, so every engine of the same class loader shared the caches of the others, and shutting down one engine shut them down for all.
A page saved by an engine that is still running, like the one in ImageTest, showed up in the search results of another engine. This is what made SearchManagerTest and PageRenamerTest fail at random (JSPWIKI-1371). I reproduced it: a second engine listed the pages of the first one.
Each caching manager now creates and shuts down a cache manager of its own.
A new test in EhcacheCachingManagerTest fails without the change (expected null but was the content of the other manager) and passes with it. The test suites of jspwiki-cache and jspwiki-main pass (1169 tests in jspwiki-main).