         return try? Data(contentsOf: url)
     }
 
-    private func _setData(data: Data, for key: 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) {
         _lock.sync {
             let change = _staging.add(data: data, for: key)
             _wqueue.async {

        }
    }

    // MARK: Managing URLs

    /// Uses the `FilenameGenerator` that the cache was initialized with to

    /// Retrieves data for the given key. The completion will be called
    /// syncrhonously if there is no cached data for the given key.
    public func cachedData(for key: Key) -> Data? {
        _lock.lock()

        if let change = _staging.change(for: key) {
