Defined Type: squid::cache

Defined in:
manifests/cache.pp

Summary

Defines cache entries for a squid server.

Overview

Examples:

squid::cache { 'our_network_hosts_acl':
  action    => 'deny',
  comment   => 'Our networks hosts are denied for caching',
}

Adds a squid.conf line:
#Our networks hosts denied for caching
cache deny our_network_hosts_acl

Parameters:

  • action (Enum['allow', 'deny']) (defaults to: 'allow')

    Allow/deny caching for $title

  • comment (String) (defaults to: "cache fragment for ${value}")

    Cache entry’s preceding comment

  • order (String) (defaults to: '05')

    Order can be used to configure where in ‘squid.conf`this configuration section should occur.

  • value (String) (defaults to: $title)

See Also:



20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/cache.pp', line 20

define squid::cache (
  Enum['allow', 'deny'] $action = 'allow',
  String $value   = $title,
  String $order   = '05',
  String $comment = "cache fragment for ${value}"
) {
  concat::fragment { "squid_cache_${value}":
    target  => $squid::config,
    content => template('squid/squid.conf.cache.erb'),
    order   => "21-${order}-${action}",
  }
}