     ///
     open var caption: NSAttributedString? {
         didSet {
-            styledCaption = applyCaptionAppearance(to: caption)
+            styledCaptionCache = nil
         }
     }
 

        guard let styledCaption = styledCaption else {
            return
        }

        let styledBounds = captionBounds(containerBounds: bounds, mediaBounds: mediaBounds)
        styledCaption.draw(in: styledBounds)


    /// Attachment's Caption String, with MediaAttachment's appearance attributes applied.
    ///
    private var styledCaptionCache: NSAttributedString?

    /// Returns the cached caption (with our custom attributes applied), or regenerates the Styled Caption, if needed.
    ///
    private var styledCaption: NSAttributedString? {
        if let caption = styledCaptionCache {
            return caption
        }

        styledCaptionCache = applyCaptionAppearance(to: caption)
        return styledCaptionCache
    }


    /// Creates a new attachment
