Changeset 4828


Ignore:
Timestamp:
Mar 23, 2009, 1:10:38 PM (13 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1262: Overview and correction factor plots should use the static cache

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/servlet/PlotServlet.java

    r4825 r4828  
    365365      Values.getStringOrNull(request.getParameter("hiloAggregate"));
    366366   
     367    StaticCache cache = Application.getStaticCache();
     368    if (cacheKey != null) cacheKey = cacheBase + cacheKey;
    367369    InputStream cachedImageIn = null;
    368370    OutputStream cachedImageOut = null;
     
    374376      if (cacheKey != null)
    375377      {
    376         cacheKey = cacheBase + cacheKey;
    377         StaticCache cache = Application.getStaticCache();
    378378        try
    379379        {
    380           cachedImageIn = cache.read(cacheKey);
    381           if (cachedImageIn == null)
    382           {
    383             cachedImageOut = cache.write(cacheKey);
    384           }
     380          cachedImageIn = cache.read(cacheKey, 500);
    385381        }
    386382        catch (IOException ex)
     
    592588          else if (image != null)
    593589          {
     590            if (cacheKey != null) cachedImageOut = cache.write(cacheKey, 100);
    594591            if (cachedImageOut != null)
    595592            {
     
    687684        else if (image != null)
    688685        {
    689           if (cachedImageOut != null && !wasError)
     686          if (cacheKey != null && !wasError) cachedImageOut = cache.write(cacheKey, 100);
     687          if (cachedImageOut != null)
    690688          {
    691689            out = new TeeOutputStream(out, cachedImageOut);
Note: See TracChangeset for help on using the changeset viewer.