toParamCacheStrategyTest method

String toParamCacheStrategyTest({
  1. int? ttl,
  2. bool? keepExpiredCache,
})

Implementation

String toParamCacheStrategyTest({int? ttl, bool? keepExpiredCache}) {
  if (this == null) {
    return '';
  }
  if (this == CacheStrategy.justAsync) {
    return 'cacheStrategy: ${this?.value.pascalCase}Strategy(),';
  }
  return 'cacheStrategy: ${this?.value.pascalCase}Strategy(${ttl == null ? '' : 'ttlValue: const Duration(minutes: $ttl)'}${keepExpiredCache == null ? '' : ttl == null ? '' : ', keepExpiredCache: $keepExpiredCache'}${ttl != null || keepExpiredCache != null ? ',' : ''}),';
}