public AssetHandler maxAge(final String maxAge) {
    Try.apply(() -> Long.parseLong(maxAge))
        .recover(x -> ConfigFactory.empty()
            .withValue("v", ConfigValueFactory.fromAnyRef(maxAge))
            .getDuration("v")
            .getSeconds())
        .onSuccess(this::maxAge);
    return this;
  }
public AssetHandler maxAge(final String maxAge) {
    Try.apply(() -> Long.parseLong(maxAge))
        .recover(x -> ConfigFactory.empty()
            .withValue("v", ConfigValueFactory.fromAnyRef(maxAge))
            .getDuration("v")
            .getSeconds())
        .onSuccess(this::maxAge);
    return this;
  }
public AssetHandler maxAge ( final String maxAge ) { Try . apply ( ( ) -> Long . parseLong ( maxAge ) ) . recover ( x -> ConfigFactory . empty ( ) . withValue ( "v" , ConfigValueFactory . fromAnyRef ( maxAge ) ) . getDuration ( "v" ) . getSeconds ( ) ) . onSuccess ( this :: maxAge ) ; return this ; }
Parse value as {@link Duration}. If the value is already a number then it uses as seconds.
Otherwise, it parse expressions like: 8m, 1h, 365d, etc...

@param maxAge Set the cache header max-age value in seconds.
@return This handler.
Parse value as { @link Duration } . If the value is already a number then it uses as seconds . Otherwise it parse expressions like : 8m 1h 365d etc ...