HttpCacheObject constructor

HttpCacheObject(
  1. String url,
  2. String cacheDirectory, {
  3. String? headers,
  4. DateTime? expiredTime,
  5. String? eTag,
  6. int? contentLength,
  7. DateTime? lastUsed,
  8. DateTime? lastModified,
  9. String? origin,
  10. String? contentChecksum,
  11. String? hash,
})

Implementation

HttpCacheObject(
  this.url,
  this.cacheDirectory, {
  this.headers,
  this.expiredTime,
  this.eTag,
  this.contentLength,
  this.lastUsed,
  this.lastModified,
  this.origin,
  this.contentChecksum,
  String? hash,
})  : hash = hash ?? _generateHash(url),
      _file = File(path.join(cacheDirectory, hash ?? _generateHash(url))),
      _lockFile = File(path.join(cacheDirectory, '${hash ?? _generateHash(url)}.lock')),
      _blob = HttpCacheObjectBlob(path.join(cacheDirectory, '${hash ?? _generateHash(url)}-blob'));