Mail Index


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

[ApacheGallery] cache location



The current release usr /var/tmp/Apache-Gallery as default cache location. The following patch change this for /var/cache/gallery, which is better FHS-compliant, and immune to /var/tmp/ content removal moreover.
--
There are no working trigger cables, unless they are too short
		-- Ralf's Laws of Observational Astronomy n°2
--- lib/Apache/Gallery.pm~	2005-01-26 13:54:00.167991942 +0100
+++ lib/Apache/Gallery.pm	2005-01-26 13:54:39.776042698 +0100
@@ -795,7 +795,7 @@
 
 	unless ($r->dir_config('GalleryCacheDir')) {
 
-		$cache_root = '/var/tmp/Apache-Gallery/';
+		$cache_root = '/var/cache/gallery/';
 		if ($r->server->is_virtual) {
 			$cache_root = File::Spec->catdir($cache_root, $r->server->server_hostname);
 		} else {
--- t/004_cache_dir.t~	2003-05-24 16:05:36.000000000 +0200
+++ t/004_cache_dir.t	2005-01-26 14:04:12.505278625 +0100
@@ -42,12 +42,12 @@
 }
 
 my $r=request(undef, 1);
-is(Apache::Gallery::cache_dir($r, 1), '/var/tmp/Apache-Gallery/hostname/uripath1/uripath2');
-is(Apache::Gallery::cache_dir($r, 0), '/var/tmp/Apache-Gallery/hostname/uripath1/uripath2/urifile');
+is(Apache::Gallery::cache_dir($r, 1), '/var/cache/gallery/hostname/uripath1/uripath2');
+is(Apache::Gallery::cache_dir($r, 0), '/var/cache/gallery/hostname/uripath1/uripath2/urifile');
 
 $r=request(undef, 0);
-is(Apache::Gallery::cache_dir($r, 1), '/var/tmp/Apache-Gallery/location/uripath1/uripath2');
-is(Apache::Gallery::cache_dir($r, 0), '/var/tmp/Apache-Gallery/location/uripath1/uripath2/urifile');
+is(Apache::Gallery::cache_dir($r, 1), '/var/cache/gallery/location/uripath1/uripath2');
+is(Apache::Gallery::cache_dir($r, 0), '/var/cache/gallery/location/uripath1/uripath2/urifile');
 
 $r=request('t/cachetest', 1);
 is(Apache::Gallery::cache_dir($r, 1), 't/cachetest/uripath1/uripath2');