getCache method
Future<ResponseCache>
getCache(
- String scenarioName,
- String iterationName, {
- CancellationToken? cancellationToken,
override
Returns a ResponseCache for responses associated with the given
scenarioName and iterationName.
Implementation
@override
Future<ResponseCache> getCache(
String scenarioName,
String iterationName, {
CancellationToken? cancellationToken,
}) async {
_validateSegment(scenarioName, 'scenarioName');
_validateSegment(iterationName, 'iterationName');
final sep = Platform.pathSeparator;
final cacheDir = '$_cacheRootPath$sep$scenarioName$sep$iterationName';
return DiskBasedResponseCache(
cacheDir,
timeToLive: _timeToLive,
clock: _clock,
);
}