Package grails.plugin.cache

Examples of grails.plugin.cache.Timer.stop()


      // Must unlock the cache if the above fails. Will be logged at Filter
      releaseCacheLocks(operationsByType, key);
      throw e;
    }

    timer.stop(false);
    response.addHeader(X_CACHED, String.valueOf(false));
    return pageInfo;
  }

  protected PageInfo buildCachedPageInfo(HttpServletRequest request, HttpServletResponse response,
View Full Code Here


    // to pick the appropriate layout.
    if (StringUtils.hasLength(getContext().getControllerName())) {
      Object controller = lookupController(getContext().getControllerClass());
      request.setAttribute(GrailsApplicationAttributes.CONTROLLER, controller);
    }
    timer.stop(true);
    response.addHeader(X_CACHED, String.valueOf(true));
    return pageInfo;
  }

  protected abstract int getTimeToLive(ValueWrapper element);
View Full Code Here

      // Must unlock the cache if the above fails. Will be logged at Filter
      releaseCacheLocks(operationsByType, key);
      throw e;
    }

    timer.stop(false);
    response.addHeader(X_CACHED, String.valueOf(false));
    return pageInfo;
  }

  protected PageInfo buildCachedPageInfo(HttpServletRequest request, HttpServletResponse response,
View Full Code Here

    catch (LockTimeoutException e) {
      //do not release the lock, because you never acquired it
      throw e;
    }

    timer.stop(true);
    response.addHeader(X_CACHED, String.valueOf(true));
    return pageInfo;
  }

  protected abstract int getTimeToLive(ValueWrapper element);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.