Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,16 @@ public void shutdown() {
public void initialize( final Engine engine, final Properties props ) throws WikiException {
final String cacheEnabled = TextUtil.getStringProperty( props, PROP_CACHE_ENABLE, PROP_USECACHE_DEPRECATED, "true" );
final boolean useCache = "true".equalsIgnoreCase( cacheEnabled );
final String confLocation = "/" + TextUtil.getStringProperty( props, PROP_CACHE_CONF_FILE, "ehcache-jspwiki.xml" );
if( useCache ) {
final URL location = this.getClass().getResource( confLocation );
String val = TextUtil.getStringProperty( props, PROP_CACHE_CONF_FILE, "ehcache-jspwiki.xml" );
URL location = this.getClass().getResource( "/" + val );
if (location == null) {
location = this.getClass().getResource( val );
}
LOG.info( "Reading ehcache configuration file from classpath on /{}", location );
if (location == null ) {
LOG.error( "The ehcache configuration file from classpath on {} could not be loaded. Check setting {}", val , PROP_CACHE_CONF_FILE);
}
cacheManager = CacheManager.create( location );
registerCache( CACHE_ATTACHMENTS );
registerCache( CACHE_ATTACHMENTS_COLLECTION );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ jspwiki.attachment.maxsize=4000000
jspwiki.breakTitleWithSpaces=true
jspwiki.searchProvider=LuceneSearchProvider
jspwiki.security=jaas
#disabled due to classpath loading issues with the portable build see JSPWIKI-1199
jspwiki.cache.enable=false
jspwiki.cache.config-file=ehcache-woas-department.xml
jspwiki.cache.config-file=ehcache-woas-department

# jspwiki.xmlGroupDatabaseFile=/usr/local/tomcat/lib/groupdatabase.xml
# jspwiki.xmlUserDatabaseFile=/usr/local/tomcat/lib/userdatabase.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jspwiki.breakTitleWithSpaces=true
jspwiki.pageProvider=FileSystemProvider
jspwiki.searchProvider=BasicSearchProvider
jspwiki.security=jaas
#disabled due to classpath loading issues with the portable build see JSPWIKI-1199
jspwiki.cache.enable=false
jspwiki.cache.config-file=ehcache-woas-personal.xml

Expand Down
Loading