     /// - parameter filenameGenerator: Generates a filename for the given URL.
     /// The default implementation generates a filename using SHA1 hash function.
     public convenience init(name: String, filenameGenerator: @escaping (String) -> String? = DataCache.filename(for:)) throws {
-        guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
-            throw NSError(domain: NSCocoaErrorDomain, code: NSFileNoSuchFileError, userInfo: nil)
-        }
-        try self.init(path: root.appendingPathComponent(name, isDirectory: true), filenameGenerator: filenameGenerator)
+    guard let root = FileManager.default.urls(for: .cachesDirectory, in: .userDomainMask).first else {
+    throw NSError(domain: NSCocoaErrorDomain, code: NSFileNoSuchFileError, userInfo: nil)
+    }
+    try self.init(path: root.appendingPathComponent(name, isDirectory: true), filenameGenerator: filenameGenerator)
     }
 
     /// Creates a cache instance with a given path.
     /// - parameter filenameGenerator: Generates a filename for the given URL.
     /// The default implementation generates a filename using SHA1 hash function.
     public init(path: URL, filenameGenerator: @escaping (String) -> String? = DataCache.filename(for:)) throws {
-        self.path = path
-        self._filenameGenerator = filenameGenerator
-        try FileManager.default.createDirectory(at: path, withIntermediateDirectories: true, attributes: nil)
+    self.path = path
+    self._filenameGenerator = filenameGenerator
+    try FileManager.default.createDirectory(at: path, withIntermediateDirectories: true, attributes: nil)
     }
 
     /// A `FilenameGenerator` implementation which uses SHA1 hash function to
     /// generate a filename from the given key.
     public static func filename(for key: String) -> String? {
-        return key.sha1
+    return key.sha1
     }
     #else
     /// Creates a cache instance with a given `name`. The cache creates a directory


    // MARK: Managing URLs

    public func filename(for key: Key) -> String? {
        return _filenameGenerator(key)
    }

    /// Stores data for the given key. The method returns instantly and the data
    /// is written asyncrhonously.
    public func storeData(_ data: Data, for key: Key) {
        _setData(data: data, for: key)
    }

    /// Removes data for the given key. The method returns instantly, the data
    /// is removed asyncrhonously.
    public func removeData(for key: Key) {
        _removeData(for: key)
    }

    // MARK: Subscipt

    /// Accesses the data associated with the given key for reading and writing.
    ///
    /// When you assign a new data for a key and the key already exists, the cache
    /// overwrites the existing data.
    ///
    /// When assigning or removing data, the subscript adds a requested operation
    /// in a staging area and returns immediately. The staging area allows for
    /// reading and writing data in parallel.
    ///
    ///     // Schedules data to be written asynchronously and returns immediately
    ///     cache[key] = data
    ///
    ///     // The data is returned from the staging area
    ///     let data = cache[key]
    ///
    ///     // Schedules data to be removed asynchronously and returns immediately
    ///     cache[key] = nil
    ///
    ///     // Data is nil
    ///     let data = cache[key]
    ///
    subscript(key: Key) -> Data? {
        get {
            return _getData(for: key)
