Mail Index


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ApacheGallery] move the cache to /var/cache/... ?



On Thu, Aug 10, 2006 at 11:23:39PM +0200, Jesus Climent wrote:

> Any thoughts?

The reason for choosing /var/tmp, was that i wanted it to be a directory
that existed in all variations of UNIX/Linux/BSD.

I actually made a small patch that allows the user to configure where
they want the whole cache, not just per virtualhost.

I don't see any problem in moving it to /var/cache, combined with the
ability to let the user choose where he wants the cache, if not in
/var/cache. I wanted it in /space/cache and didn't want to change the
code or create a symlink, but never got around to submitting the patch
to the list.

-- 
-René

--- Gallery.pm.org	2006-04-25 01:52:56.000000000 +0200
+++ /usr/share/perl5/Apache/Gallery.pm	2006-08-11 15:47:38.678042900 +0200
@@ -767,9 +767,10 @@
 
 	my $cache_root;
 
+	$cache_root = $r->dir_config('GalleryCacheRoot') ? $r->dir_config('GalleryCacheRoot') : '/var/tmp/Apache-Gallery/';
+
 	unless ($r->dir_config('GalleryCacheDir')) {
 
-		$cache_root = '/var/tmp/Apache-Gallery/';
 		if ($r->server->is_virtual) {
 			$cache_root = File::Spec->catdir($cache_root, $r->server->server_hostname);
 		} else {