CachedValue(V payload, long keepAliveTimeMsecs) {
    if (payload == null) {
      throw new IllegalArgumentException("Cannot accept null values.");
    }
    if (keepAliveTimeMsecs < 0) {
      throw new IllegalArgumentException("Invalid keepAliveTime" + keepAliveTimeMsecs);
    }
    this.payload = payload;
    this.timeEntered = System.currentTimeMillis();
    this.keepAliveTimeMsecs = keepAliveTimeMsecs;
  }