Cache/CacheAbstract.php
/**
   * Create expiration timestamp
   * 
   * @param mixed $duration can be a number of seconds or any argument accepted by strtotime()
   * @return int
   * @throws JigException
   */
Create expiration timestamp

@param mixed $duration can be a number of seconds or any argument accepted by strtotime()
@return int
@throws JigException
Create expiration timestamp @param mixed $duration can be a number of seconds or any argument accepted by strtotime () @return int @throws JigException
protected static function computeDuration($duration = 0) {
    switch (true) {
      case !$duration;
        $duration = strtotime('+1 week');
        break;
      case !is_numeric($duration);
        $duration = strtotime($duration);
        break;
      case is_numeric($duration);
        $duration = intval($duration);
        break;
      default:
        throw new JigException('Invalid duration ' . $duration . ', caching not possible');
    }
    return $duration;
  }
protected static function computeDuration ( $ duration = 0 ) { switch ( true ) { case ! $ duration ; $ duration = strtotime ( '+1 week' ) ; break ; case ! is_numeric ( $ duration ) ; $ duration = strtotime ( $ duration ) ; break ; case is_numeric ( $ duration ) ; $ duration = intval ( $ duration ) ; break ; default : throw new JigException ( 'Invalid duration ' . $ duration . ', caching not possible' ) ; } return $ duration ; }
Create expiration timestamp
Create expiration timestamp