write method
Stores response under key.
Implementation
@override
Future<void> write(String key, String response) async {
await _directory.create(recursive: true);
final target = _fileFor(key);
final temp = File('${target.path}.tmp.$pid.${_tempCounter++}');
await temp.writeAsString(response, flush: true);
await temp.rename(target.path);
}