vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function handleCacheFile

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

bool handleCacheFile (
  scope HTTPServerRequest req,
  scope HTTPServerResponse res,
  string file,
  string cache_control = null,
  core.time.Duration max_age = zero()
) @safe;

bool handleCacheFile (
  scope HTTPServerRequest req,
  scope HTTPServerResponse res,
  GenericPath!(vibe.core.path.PosixPathFormat) file,
  string cache_control = null,
  core.time.Duration max_age = zero()
) @safe;

bool handleCacheFile (
  scope HTTPServerRequest req,
  scope HTTPServerResponse res,
  FileInfo dirent,
  string cache_control = null,
  core.time.Duration max_age = zero()
) @safe;

See Also

handleCache

Returns

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

Authors

Sönke Ludwig

Copyright

© 2012-2015 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.