 		var inlineHtml: [String] = []
 	}
 
-	private struct SavedCache: Codable {
+	private struct SavedCacheEntry: Codable, FetchableRecord, TableRecord, PersistableRecord {
 		let fileId: Int
 		let fileVersion: Int
 		let chunks: [ChunkInfo]

	let previewId: Int
	let fileId: Int
	let workspace: AppWorkspace
	private var chunkInfo: [ChunkInfo] = []
	public var contentCached: Bool { return chunkInfo.count > 0 }
	public let _document: Property<RmdDocument?>

		self.workspace = workspace
		self._document = Property<RmdDocument?>(documentProperty)
		NotificationCenter.default.addObserver(self, selector: #selector(documentUpdated), name: .rmdDocumentUpdated, object: self.document)
		readCache()
	}
	
	deinit {
		saveCache()
	}
	
	/// called when the document's content was updated
	@objc func documentUpdated(note: Notification) {
		guard var changedIndexes = note.userInfo?[RmdDocument.changedIndexesKey] as? [Int] else {
