Bug 13180 - rename "Cache" directory to better convey importance of its contents
: rename "Cache" directory to better convey importance of its contents
Status: NEW
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: unspecified
: All All
: P3 enhancement (vote)
: 8.0.0
Assigned To: Adrian Smith
http://forums.slimdevices.com/showthr...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-31 22:12 UTC by Peter Watkins
Modified: 2009-08-11 14:07 UTC (History)
3 users (show)

See Also:
Category: Feature


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Watkins 2009-07-31 22:12:22 UTC
The "cache" directory stores a wide variety of important files, but its name does not convey the value and importance of those files. Users expect "cache" directories to contain replacable assets, and expect that the "cache" exists merely to benefit performance. Users are accustomed to "clearing caches" (especially those who use Web browsers frequently). 

The cache directory should be renamed to reduce confusion, and help keep users from erroneously believing that deleting its contents is a good idea.

I would suggest something like "ServerData". There may be some files (SB Controller firmware downloads?) that truly are replaceable, cached items. Making a new "cache" folder (under ServerData?) would be fine for such files, but irreplaceable files should never reside under a folder named "Cache" or anything like that.
Comment 1 Mark Miksis 2009-07-31 22:28:05 UTC
I think Alan is doing some work to move certain things that cannot be wiped and recreated out of cachedir and into prefsdir.  I can't find a bug and I don't know the details, so adding Alan to the cc here...
Comment 2 Philip Meyer 2009-08-01 00:21:00 UTC
Michael Herger asked for suggestions - here's mine:

I suggest one folder for permanent data, and one folder for temporary data.  A command-line switch to override the default path for each of those.

cachedir is fine as it is for temporary data, but should only contain content that can be recreated without losing anything if the folder were trashed.

prefsdir should be extended to be a collection of permanent data (eg. call it appdir, and within the folder that that points to, have a prefsdir sub-folder).

I keep the cachedir away from my C:, to avoid creating lots of little files on that drive, because it's a pain for defragging (otherwise I'd trash it before defragging, and let the app rebuild the cache afterwards).  I don't backup the cachedir.

I keep the current prefsdir on a partition that contains all my documents and other data, which is backed up (or should be - well overdue!).

I like to download/install plugins manually, so I have a backup copy of the files such I can reinstall if necessary without having to download, whereby I would be at the mercy of third-party developers whose websites may not be around later, or there repos updated to point to newer versions that won't work with other plugins, etc.  If all plugins and their prefs, and any other permanent stuff were all in one app data directory, it would be easier to backup a consistent set.

eg. in C:\Documents and Settings\All Users\Squeezebox Server\
	Cache\
		scanned music DB
	Data\
		prefs\
		logfiles\
		plugins\
		persistent data DB
		[anything else that isn't cache data]

--cachedir would point to C:\Documents and Settings\All Users\Squeezebox Server\Cache

--datadir would point to C:\Documents and Settings\All Users\Squeezebox Server\Data


>>> There are things in the user prefs folder that are not preferences, eg.
>>> the current playlist of each player.
>
>It used to be in cache - which you wouldn't like neither. What would you  
>suggest?
>
No, it used to be in the playlist dir, which meant the scanner picked them up - I didn't like that!  The cachedir is probably more correct than prefsdir; I don't think it matters if those files are lost - if the DB were trashed (or wipe and rescan), those playlists are invalid anyway?
Comment 3 James Richardson 2009-08-03 09:53:21 UTC
Adrian: can you have a look at this one, possible come up with a good solution before we ship 7.4?  else this could be a migration mess.
Comment 4 Adrian Smith 2009-08-04 02:39:55 UTC
The simple answer to this issue is as per Peter - we just rename "cache" to "data" and then there is no implication that the contents are a cache (although it may contain things which are caches)

I suspect if we had called it something other than cache to start with we would not be having this discussion!  I can't see the value in any more radical changes than this.
Comment 5 Michael Herger 2009-08-11 05:52:07 UTC
> The simple answer to this issue is as per Peter - we just rename "cache" to
> "data" and then there is no implication that the contents are a cache 

I'd clearly vote against this. Would only add migration issues with no real win. Most users will _never_ touch those folders, not even see them.

"What's in a name? That which we call cache
By any other name would smell as bad."

Moving installed plugins out of cache would be a better solution: one issue, one fix.
Comment 6 Adrian Smith 2009-08-11 10:45:50 UTC
I don't really care - if you have a guareteed writable location for all platforms then we can move plugins to that..  Note that there are some regexp's in the plugin code which look for InstalledPlugins, so we should keen that on the path..
Comment 7 Michael Herger 2009-08-11 14:07:37 UTC
Let's reconsider this for 8.0. But we have more important things to do for 7.4 in too little time.