copyForUpdate method

CacheEntry copyForUpdate(
  1. dynamic value, {
  2. String? key,
  3. DateTime? expiryTime,
  4. DateTime? creationTime,
  5. DateTime? accessTime,
  6. DateTime? updateTime,
  7. int? hitCount,
})

Copies a CacheEntry

  • value: The value
  • key: The cache key
  • expiryTime: The cache expiry time
  • creationTime: The cache creation time
  • accessTime: The cache access time
  • updateTime: The cache update time
  • hitCount: The cache hit count

Implementation

CacheEntry copyForUpdate(dynamic value,
        {String? key,
        DateTime? expiryTime,
        DateTime? creationTime,
        DateTime? accessTime,
        DateTime? updateTime,
        int? hitCount}) =>
    CacheEntry._(
      key ?? this.key,
      value,
      expiryTime ?? this.expiryTime,
      creationTime ?? this.creationTime,
      true,
      accessTime: accessTime ?? this.accessTime,
      updateTime: updateTime ?? this.updateTime,
      hitCount: hitCount ?? this.hitCount,
    );