Difference between revisions of "APC Metadata Caching"

From PartKeepr Wiki
Jump to: navigation, search
(Created page with "Symfony, per default, uses a deeply nested filesystem structure. This might be a problem on systems with slow I/O, like a Raspberry Pi. You can configure PartKeepr to use APC...")
 
 
Line 1: Line 1:
 
Symfony, per default, uses a deeply nested filesystem structure. This might be a problem on systems with slow I/O, like a Raspberry Pi. You can configure PartKeepr to use APC as metadata cache, greatly decreasing the required I/O performance.
 
Symfony, per default, uses a deeply nested filesystem structure. This might be a problem on systems with slow I/O, like a Raspberry Pi. You can configure PartKeepr to use APC as metadata cache, greatly decreasing the required I/O performance.
 +
 +
* Install the PHP APC Module
 +
** On Debian, the module is called <code>php5-apcu</code> for PHP5 and <code>php-apcu</code> for PHP7.
  
 
* Open <code>app/config/config_framework.yml</code> in a text editor
 
* Open <code>app/config/config_framework.yml</code> in a text editor

Latest revision as of 03:03, 25 February 2017

Symfony, per default, uses a deeply nested filesystem structure. This might be a problem on systems with slow I/O, like a Raspberry Pi. You can configure PartKeepr to use APC as metadata cache, greatly decreasing the required I/O performance.

  • Install the PHP APC Module
    • On Debian, the module is called php5-apcu for PHP5 and php-apcu for PHP7.
  • Open app/config/config_framework.yml in a text editor
  • Note that the indentation is mandatory
  • Add the following snippet to the top of the file:
services:
    app.doctrine.apc_cache:
       class: Doctrine\Common\Cache\ApcCache
       calls:
           - [setNamespace, [""]]
  • Below the framework, insert the following lines so that it reads:
framework:
    annotations:
        cache: "app.doctrine.apc_cache"

Save the file and re-run setup.