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)164MITPHPPHP &gt;=5.4.0

Since Dec 16Pushed 7y ago6 watchersCompare

[ 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 master Synced 2w ago

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 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

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

3528d 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

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M418](/packages/easycorp-easyadmin-bundle)[snc/redis-bundle

A Redis bundle for Symfony

1.0k41.4M77](/packages/snc-redis-bundle)[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.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[ecotone/symfony-bundle

Ecotone for Symfony — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Symfony Messenger, via PHP attributes.

11258.2k1](/packages/ecotone-symfony-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1617.3k16](/packages/2lenet-crudit-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

12413.3k](/packages/ahmed-bhs-doctrine-doctor)

PHPackages © 2026

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