class nginx::cache { file { '/var/cache/nginx': ensure => directory, owner => 'www-data', group => 'www-data', mode => '0700', } file { '/etc/nginx/conf.d/cache.conf' : ensure => present, owner => 'root', group => 'root', mode => '0644', content => "proxy_cache_path /var/cache/nginx/ levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g;\n", require => File['/var/cache/nginx'], notify => Service['nginx'], } }