Re: Storing cache data in NSDocument
Re: Storing cache data in NSDocument
- Subject: Re: Storing cache data in NSDocument
- From: Rick Mann <email@hidden>
- Date: Thu, 16 Jun 2016 16:58:47 -0700
> On Jun 16, 2016, at 16:57 , Jens Alfke <email@hidden> wrote:
>
>
>> On Jun 16, 2016, at 3:46 PM, Rick Mann <email@hidden> wrote:
>>
>> My complex app generates a lot of intermediary data that's cached to speed up operations. Would it be reasonable to store this inside the document package? The idea being that that way, the entire set of data can be moved around easily, without requiring the intermediate data to be rebuilt just because a file was moved to a new machine.
>
> This seems to have several drawbacks, like increasing the size of the document. How big is the intermediary data? What if someone needs to email the document — will that data make it too big?
>
> Also, what happens if the user doesn’t have write access to the document? It might be on a read-only file server volume, or in a Time Machine backup or something. (I was going to add “or on a CD-ROM”, but I don’t know if anyone still uses those.)
>
> I would store this data in a subdirectory of the standard Caches directory, with a filename based on the document’s unique file ID.
Yeah, that's what I'm currently doing. I guess the frequency with which files are transferred is very low. Regenerating some of the data can take many hours, though…
Thanks for the thoughts!
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden