handleCacheFile

Calls handleCache with prefilled etag and lastModified value based on a file.

  1. bool handleCacheFile(HTTPServerRequest req, HTTPServerResponse res, string file, string cache_control, Duration max_age)
  2. bool handleCacheFile(HTTPServerRequest req, HTTPServerResponse res, NativePath file, string cache_control, Duration max_age)
    @safe
    bool
    handleCacheFile
    (,,
    NativePath file
    ,
    string cache_control = null
    ,
    Duration max_age = Duration.zero
    )
  3. bool handleCacheFile(HTTPServerRequest req, HTTPServerResponse res, FileInfo dirent, string cache_control, Duration max_age)

Return Value

Type: bool

true if the cache was already handled and no further response must be sent or false if a response must be sent.

See Also

handleCache

Meta