Changeset 4310


Ignore:
Timestamp:
01/21/14 10:43:22 (10 years ago)
Author:
twagoo
Message:

Updated initial values for wicket cache size params and added logging of these values

Location:
vlo/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vlo/trunk/vlo_importer/src/main/resources/VloConfig.xml

    r4283 r4310  
    11<VloConfig>
    22   
    3     <pagesInApplicationCache>128</pagesInApplicationCache>
     3    <!-- Sets the maximum number of page instances which will be stored in the application scoped second level cache for faster retrieval -->
     4    <pagesInApplicationCache>40</pagesInApplicationCache>
    45   
    5     <sessionCacheSize>500</sessionCacheSize>
     6    <!-- Sets the maximum size (in KILOBYTES) of the File where page instances per session are stored. -->
     7    <sessionCacheSize>10000</sessionCacheSize>
    68   
    79    <deleteAllFirst>true</deleteAllFirst>
  • vlo/trunk/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java

    r4283 r4310  
    2121import org.apache.wicket.util.string.StringValue;
    2222import org.apache.wicket.util.lang.Bytes;
     23import org.slf4j.Logger;
     24import org.slf4j.LoggerFactory;
    2325
    2426/**
     
    3234public class VloWebApplication extends WebApplication {
    3335
     36    private final static Logger logger = LoggerFactory.getLogger(VloWebApplication.class);
     37   
    3438    /**
    3539     * Customised client request cycle<br><br>
     
    113117       
    114118        // configure cache by applying the vlo configuration settings to it
    115         this.getStoreSettings().setInmemoryCacheSize(VloConfig.getPagesInApplicationCache());
    116         this.getStoreSettings().setMaxSizePerSession(Bytes.kilobytes((long)VloConfig.getSessionCacheSize()));
     119        final int pagesInApplicationCache = VloConfig.getPagesInApplicationCache();
     120        logger.info("Setting Wicket in-memory cache size to {}", pagesInApplicationCache);
     121        this.getStoreSettings().setInmemoryCacheSize(pagesInApplicationCache);
     122       
     123        final Bytes sessionCacheSize = Bytes.kilobytes((long)VloConfig.getSessionCacheSize());
     124        logger.info("Setting Wicket max size per session to {}", sessionCacheSize);
     125        this.getStoreSettings().setMaxSizePerSession(sessionCacheSize);
    117126
    118127        // creata an object referring to the search results
Note: See TracChangeset for help on using the changeset viewer.