Separate cgit cache by vhost

If they share the same cache, they may cross-serve data.

Change-Id: I78dcea50237c5f613133b4823be5e6ca30c425a8
This commit is contained in:
James E. Blair 2018-03-27 16:02:59 -07:00
parent 48cef6aba7
commit 55c432baf6
1 changed files with 9 additions and 0 deletions

View File

@ -37,6 +37,7 @@ define cgit::site(
'cache-dynamic-ttl' => 1,
'cache-repo-ttl' => 1,
'cache-root-ttl' => 1,
'cache-root' => "/var/cache/cgit/${cgit_vhost_name}",
'clone-prefix' => "git://${::fqdn} https://${::fqdn}",
'enable-index-owner' => 0,
'enable-index-links' => 1,
@ -101,6 +102,14 @@ define cgit::site(
],
}
file { "/var/cache/cgit/${cgit_vhost_name}":
ensure => directory,
owner => 'apache',
group => 'root',
mode => '0755',
require => Package['cgit']
}
file { $cgitdir:
ensure => directory,
owner => 'root',