Page 1 of 1

Other operating systems and the octree cache

Posted: Sun Feb 26, 2006 12:03 pm
by winston
The octree cache on OS X is stored in $HOME/Library/Application Data/Oolite. On UNIX+GNUstep, this path is $HOME/GNUstep/Library/Application Data/Oolite (and is created the first time by the 'oolite' script that sets the environment and runs the game). I'm not certain how ensuring this is created on Windows will work, but I assume that the script that starts it on Windows can use the Windows HOMEPATH (IIRC) environment variable to find the user's GNUstep directory.

Posted: Sun Feb 26, 2006 1:08 pm
by JensAyton
Hmm. On OS X, it really ought to be in Library/Caches. For efficiency, I’d strongly reccomend switching to binary plist format under OS X ([NSPropertyListSerialization dataFromPropertyList:plist format:NSPropertyListBinaryFormat_v1_0 errorDescription:NULL]; available from OS X 10.2). I’d have used a date stamp and possibly a checksum to detect model changes, but hey. Oh, and it’s “leaves”, not “leafs”. :-)

Posted: Sun Feb 26, 2006 2:15 pm
by JensAyton
Oh, one other thing: each binary data cache should have a flag indicating endianness. The simplest way to do this is to include a cookie value like 0x12345678 and ensure that it reads back correctly.

Posted: Mon Aug 14, 2006 2:49 pm
by aegidian
Ahruman wrote:
Oh, one other thing: each binary data cache should have a flag indicating endianness. The simplest way to do this is to include a cookie value like 0x12345678 and ensure that it reads back correctly.
I'm not sure we need this, caches aren't intended to be shared between machines - the main cache only need be read by the machine that wrote it.

Posted: Mon Aug 14, 2006 5:34 pm
by JensAyton
However, the way the cache is stored now it is potentially shared between machines. It is not unheard of to have a home directory on a networked volume, and this will only become more common as NAS solutions become cheaper. This is why, for instance, there exists a ~/Library/Preferences/ByHost/ (accessible via CFPreferences but apparently not NSUserDefaults).