Puppet Class: apache::mod::disk_cache
- Defined in:
- manifests/mod/disk_cache.pp
Summary
Installs and configures `mod_disk_cache`.Overview
Note:
On Apache 2.4, mod_cache_disk installed.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'manifests/mod/disk_cache.pp', line 24
class apache::mod::disk_cache (
Optional[Stdlib::Absolutepath] $cache_root = undef,
Optional[String] $cache_ignore_headers = undef,
Boolean $default_cache_enable = true,
) {
include apache
if $cache_root {
$_cache_root = $cache_root
} else {
$_cache_root = $facts['os']['family'] ? {
'Debian' => '/var/cache/apache2/mod_cache_disk',
'RedHat' => '/var/cache/httpd/proxy',
'FreeBSD' => '/var/cache/mod_cache_disk',
}
}
apache::mod { 'cache_disk': }
Class['apache::mod::cache'] -> Class['apache::mod::disk_cache']
$parameters = {
'default_cache_enable' => $default_cache_enable,
'_cache_root' => $_cache_root,
'cache_ignore_headers' => $cache_ignore_headers,
}
# Template uses $_cache_root
file { 'disk_cache.conf':
ensure => file,
path => "${apache::mod_dir}/disk_cache.conf",
mode => $apache::file_mode,
content => epp('apache/mod/disk_cache.conf.epp', $parameters),
require => Exec["mkdir ${apache::mod_dir}"],
before => File[$apache::mod_dir],
notify => Class['apache::service'],
}
}
|