phpapc

Install and configure PHP APC

Sam Bashton

bashtoni

10,066 downloads

10,066 latest version

3.4 quality score

Version information

  • 1.0.0 (latest)
released Mar 12th 2014

Start using this module

Tags: php, apc

Documentation

bashtoni/phpapc — version 1.0.0 Mar 12th 2014

#phpapc

Simple module to install and configure PHP apc cache

Example Usage

Minimal

This should install PHP apc for your system

class { 'phpapc': }

The above won't notify the PHP service, so you might want to do:

class { 'phpapc': } ~> Class['phpfpm']

Modify depending on how you're using PHP.

Customise PHP config

You can pass a hash named 'config' with arbtirary settings. These should not include the leading 'apc.'. For example:

class { 'phpapc':
  config                => {
    enable_opcode_cache => 1,
    shm_size            => '512M',
    stat                => 0
  }
}

You could of course use hiera for the above:

class { 'phpapc': }
phpapc::config:
  enable_opcode_cache: 1
  shm_size: 512M
  stat: 0