Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Apc Bundle Laravel Package

icedevelopment/apc-bundle

Symfony bundle for integrating APC-backed caching into PHP applications. It provides cache service wiring and utilities for managing APC cache entries, making it easier to use Alternative PHP Cache as a fast local cache in Symfony projects.

View on GitHub
Deep Wiki
Context7

icedevelopment/apc-bundle is a lightweight Symfony bundle for integrating APC-backed caching into your application. It exposes APC cache functionality through Symfony’s service container, making it easier to add fast in-memory caching without custom bootstrap code.

  • Symfony bundle integration for APC cache services
  • Simple service container configuration
  • Lightweight wrapper around APC caching
  • Useful for small applications and legacy Symfony projects
Frequently asked questions about Apc Bundle
Is icedevelopment/apc-bundle a Laravel package or a Symfony bundle?
It is a Symfony bundle. It ships a Bundle class plus a console command registered through Symfony's dependency injection container, so there is no service provider, no package auto-discovery, and no php artisan integration. Composer will happily install it into a Laravel application, but Laravel's PackageManifest will never boot it and the command stays undiscoverable. Treat it as a reference implementation to read and copy, not a dependency to install.
Can I install icedevelopment/apc-bundle in a Laravel application?
You can run composer require, but nothing will execute. The console command only registers against a Symfony console application, which Laravel does not use, so you would have to manually wire the class into your own command. The realistic paths are to vendor the command class and wrap it in a Laravel command, or simply reimplement the one-line cache clear yourself. Both take under a day of engineering effort.
How do I clear the APC or APCu cache from a Laravel artisan command?
Write a small Laravel command that calls apcu_clear_cache(), guarded by extension_loaded('apcu') and function_exists('apcu_clear_cache') so it fails loudly instead of silently. Keep it in your own app code rather than pulling in an abandoned Symfony bundle, since a two-file internal implementation is cheaper to own than a supply-chain exception. Then verify the clear actually reaches the SAPI that holds the cache.
Why does clearing APC cache from the CLI not clear the cache used by PHP-FPM?
APC and APCu shared memory is scoped per SAPI process pool. A CLI process gets its own segment unless apc.enable_cli=1 is set and the segment is explicitly shared, so clearing from the console frequently clears a cache nothing else reads. The command exits 0 and reports success while the FPM workers keep serving stale entries, which is the classic silent-no-op failure you must test for before adopting.
What is the difference between apc_clear_cache() and apc_clear_cache('user')?
The no-argument call clears the system cache, which is opcode-related, while passing 'user' clears the user cache where apc_store and apcu_store entries actually live. For post-deploy invalidation of application data you almost always want the user cache. Read the command body and confirm exactly which function and argument it calls before you copy the pattern.
Does icedevelopment/apc-bundle work on PHP 8 with APCu?
PHP 8 removed the legacy apc_* function aliases in favour of apcu_*, so any code calling apc_clear_cache() directly needs the apcu-bc shim or a code change. The package had a single release in May 2022 and its Composer constraints are pinned to an end-of-life Symfony branch from the PHP 7.x era. Verify both the runtime and the extension before considering adoption.
Is icedevelopment/apc-bundle still maintained?
Every signal says no. It has zero stars, zero dependents, one release in May 2022, and no downstream consumers to surface breakage when it does fail. That combination means no security patches, no PHP 8.x compatibility work, and no one to ask when the command misbehaves. Fork it if you need the code, but do not depend on it as a package.
How do I test that an APC or APCu cache clear actually worked?
Store a value with apcu_store from the SAPI that serves production requests, trigger your clear from wherever it is meant to run, then apcu_fetch the same key back from the serving SAPI. If the value is still there, the clear was a no-op. Also confirm apc.enable_cli is set and that your FPM pools are configured to share a segment if you expect cross-SAPI clearing.
What are the alternatives to this package for cache invalidation after deploy?
First decide whether the real requirement is clearing the APCu user cache or invalidating a cache after a release, because those need different solutions. For opcode, a php-fpm reload or opcache_reset() in the release hook is usually correct, and for Laravel's own cache store you would use Cache::flush or versioned cache keys. Modern Laravel has no first-class APC driver and most estates run Redis, database or file-backed caches, so this package often solves a problem that does not exist.
How much code does icedevelopment/apc-bundle actually contain?
Roughly 20 to 40 lines: a bundle class and one console command that wraps a single PHP function call. It is not a library with reusable abstractions, it is a packaging wrapper around apc_clear_cache(). Reading the command class is faster than evaluating the package, and the copy you write yourself will be easier to keep compatible with PHP 8 and your deployment pipeline.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core