cache method

DoxResponse cache(
  1. Duration duration
)

set cache

res.cache(Duration(seconds: 10));

Implementation

DoxResponse cache(Duration duration) {
  return header(
    HttpHeaders.cacheControlHeader,
    'max-age=${duration.inSeconds}',
  );
}