Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Shared Cache Folder

Valasule Obzina
Registered User
Join date: 14 Jan 2007
Posts: 5
01-20-2009 10:47
I've been curious how difficult it would be to have a shared, or proxied, cache folder for the sl client. I started thinking about this because my girlfriend and I both use Second Life and are very commonly in the same places, wouldn't it make sense to have the cache directory shared so things are downloaded once.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
01-20-2009 10:57
The SL cache isn't really designed to be shared. When they finally switch to HTTP for texture downloads I plan on putting a squid cache in front of SL, but until then there's not much point.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
01-20-2009 10:59
I was thinking about that just this morning, though I was thinking more about it as something that companies would want.

If you're not going to change the viewer source code around, I think it's pretty much not gonna happen. It doesn't seem like it would be an overly difficult project but the viewer would have to know to go somewhere else to get textures and you'd need a piece of new software to do the caching and sit between the viewers & LL.

edit: maybe the above is what you'd need for a more full-blown local cache to save on network bandwidth. Dunno if you can do it more easily for just a couple people but I suspect not..
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
01-20-2009 11:04
I would love to see the viewer use a squid-style cache instead of the mongrel "virtual file system" cache it uses now... and of course a squid-style cache based on texture UUIDs would be totally shareable and efficient. But right now it's not doing that.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
01-20-2009 11:07
Dunno much about squid.

Would it allow for things to be aged & deleted or would it grow forever? Aside from the file system issues they bump into by having an almost-flat cache dir, it seems like one of the bigger bottlenecks is keeping track of what things are safe to delete..
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
01-20-2009 11:30
From: Sindy Tsure
Dunno much about squid.

Would it allow for things to be aged & deleted or would it grow forever?
Squid more or less uses a 3-level directory tree (eg /var/squid/cache/01/23/45/0123456789.html), with parameters to limit the size and age of cached items based on file system metadata (last change/last access time). Squid hashes the name, but the UUID is already a well-distributed hash so that's not a requirement here.

Since it's a cache, it's always *safe* to delete anything. Not always desirable, of course, but that kind of policy decision is really outside the scope of the cache layout.

For file systems that don't support last access time, you could just touch the file when it's referenced, or maintain a fixed-size header containing additional metadata.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Valasule Obzina
Registered User
Join date: 14 Jan 2007
Posts: 5
01-22-2009 08:10
Argent would you have a link to discussions about switching texture downloads to use http? We might want to flock over there and suggest that having a proxy setting for that would allow us to more easily use something like squid to cache them.