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.


VOID fast_304()

  • Description

    Perform a fast 304 cache insert. New or changed headers will not be updated into cache. The object currently in cache will simply have its TTL extended. This reduces the cache read/write overhead of a 304 response to zero. Can only be used in vcl_backend_response. If used on a non 304 response, it is ignored.

  • Return Value



STRING vcl_name()

  • Return Value

    The name of the current VCL.