Varnish Cache Plus



vmod_utils is a VMOD for useful functions that don’t require their own VMOD.



STRING newline()

  • Description

    Return a string consisting of a newline escape sequence, \n.

  • Return Value

    The newline escape sequence, \n.


STRING time_format(STRING format, BOOL local_time, [TIME time])

  • Description

    Format the time according to format. This is an interface for strftime.

  • Return Value

    The formated time as a string.

    • format

      The format that the time should be in. For more information about possible options see the man page for strftime.

    • local_time

      Should the time be in the local time zone or GMT. Defaults to GMT.

    • time

      An optional parameter of a time to format. Defaults to the current time.