HttpCacheTransporter constructor

HttpCacheTransporter(
  1. {bool onlyGET: true,
  2. int expiresIn: 15000,
  3. Transporter transporter}
)

Creates a new HttpCacheTransporter

onlyGET: only apply cache for GET method expiresIn: how long cache is expired in milliseconds transporter: use a custom transporter rather than Transporter.factory()

Implementation

HttpCacheTransporter(
    {bool onlyGET = true, int expiresIn = 15000, Transporter transporter})
    : this._onlyGET = onlyGET,
      this._expiresIn = expiresIn {
  if (transporter != null) this._transporter = transporter;
}