what do you think about this store object that is actually is a tuple of functions (or closures) and reads itself from the disk and saves itself for every change that occurs:
Declaration https://gitlab.com/vikingosegundo/brighter-hue/-/blob/master/BrighterModel/Store.swift
Implementation for Disk https://gitlab.com/vikingosegundo/brighter-hue/-/blob/master/BrighterModel/DiskStore.swift
this is the simplest form — but one might imagine to use the same declartion, but implement it for core data. also more sophisticated caching could be use.
this store is part of my Khipu architecture, that you can read about here: https://decodemeester.medium.com/khipu-rapid-and-sustainable-software-creation-in-swift-using-engineering-and-science-principles-312a933cce57?sk=8359f48cc06571e53de156db8cbc005c