PHPackages                             symbio/apc-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. symbio/apc-bundle

ActiveSymfony-bundle[Caching](/categories/caching)

symbio/apc-bundle
=================

Provides a command line tasks to operate with APC (APCu) cache from the console

1.0.0(9y ago)164MITPHP &gt;=5.4.0

Since Dec 16Compare

[ Source](https://github.com/SYMBIO/apc-bundle)[ Packagist](https://packagist.org/packages/symbio/apc-bundle)[ Docs](http://www.symbiodigital.com/)[ RSS](/packages/symbio-apc-bundle/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Provide a command line to clear APC/APCu cache from the console.

The problem with APC/APCu is that it's impossible to clear it from command line. Because even if you enable APC/APCu for PHP CLI, it's a different instance than, say, your Apache PHP or PHP-CGI APC/APCu instance.

The trick here is to create a file in the web dir, execute it through HTTP, then remove it.

Installation
============

[](#installation)

1. Add it to your composer.json:

    ```
    {
        "require": {
            "symbio/apc-bundle": "dev-master"
        }
    }
    ```

    or:

    ```
        composer require symbio/apc-bundle:dev-master
        composer update symbio/apc-bundle:dev-master
    ```
2. Add this bundle to your application kernel:

    ```
     // app/AppKernel.php
     public function registerBundles()
     {
         return array(
             // ...
             new Symbio\ApcBundle\SymbioApcBundle(),
             // ...
         );
     }

    ```
3. Add parameter with website URL:

    ```
     # app/config/parameters.yml, app/config/parameters.yml.dist
     cache.base_url: https://your.website.url

    ```
4. Configure `symbio_apc` service:

    ```
     # app/config/config.yml
     symbio_apc:
         base_url:   %cache.base_url%/
         web_dir:    %kernel.root_dir%/../web

    ```
5. Set Apache user write permissions to web\_dir

    ```
     $ chmod 775 web

    ```

Usage
=====

[](#usage)

Clear all APC/APCu cache:

```
  $ php app/console symbio:apc:clear
  $ php app/console symbio:apcu:clear

```

Capifony usage
==============

[](#capifony-usage)

To automatically clear APC/APCu cache after each capifony deploy you can define a custom task

```
namespace :symfony do
  desc "Clear APC/APCu cache"
  task :clear_apc do
    capifony_pretty_print "--> Clear APC cache"
    run "#{try_sudo} sh -c 'cd #{latest_release} && #{php_bin} #{symfony_console} symbio:apc:clear --env=#{symfony_env_prod}'"
    capifony_puts_ok
  end
end
```

and add this hook

```
# apc
after "deploy", "symfony:clear_apc"
```

Nginx configuration
===================

[](#nginx-configuration)

If you are using nginx and limiting PHP scripts that you are passing to fpm you need to allow 'APC/APCu' prefixed php files. Otherwise your web server will return the requested PHP file as text and the system won't be able to clear the APC/APCu cache.

Example configuration:

```
# Your virtual host
server {
  ...
  location ~ ^/(app|app_dev|apcu?-.*)\.php(/|$) { { # This will allow APC/APCu (apc-{MD5HASH}.php) files to be processed by fpm
    fastcgi_pass                127.0.0.1:9000;
    ...

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3483d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c6d9479e622c5a2523aeb6496edbfada9b9f2ef72248bdf965719f44fea801d0?d=identicon)[vonschau](/maintainers/vonschau)

---

Tags

symfonyapcutaskapc

### Embed Badge

![Health badge](/badges/symbio-apc-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/symbio-apc-bundle/health.svg)](https://phpackages.com/packages/symbio-apc-bundle)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k3](/packages/web-auth-webauthn-framework)[tedivm/stash-bundle

Incorporates the Stash caching library into Symfony.

841.4M16](/packages/tedivm-stash-bundle)[sabre/cache

Simple cache abstraction layer implementing PSR-16

551.3M4](/packages/sabre-cache)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

65474.5k9](/packages/web-auth-webauthn-symfony-bundle)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.2M6](/packages/symfony-bundles-redis-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
