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
Memcached Bundle

Memcached Bundle Laravel Package

mcfedr/memcached-bundle

Symfony bundle that integrates the Memcached PHP extension, providing a preconfigured Memcached client service and simple bundle configuration. Drop it into your Symfony app to use Memcached for caching or sessions without boilerplate wiring.

View on GitHub
Deep Wiki
Context7

McFedrMemcachedBundle integrates the memcached PHP extension into Symfony applications, providing a ready-to-use Memcached client wired through the service container. Servers, options, credentials and serializers are configured from a single bundle config block, so your services can depend on a shared, persistent cache layer without any boilerplate.

  • Multiple servers with weights and consistent hashing
  • Configurable SASL credentials, timeouts and connection options
  • Pluggable serializers, key encoders and compression
  • Autowirable Memcached service for dependency injection
  • Per-environment configuration via standard Symfony config
Frequently asked questions about Memcached Bundle
Is mcfedr/memcached-bundle compatible with Laravel?
No. It is a Symfony DI bundle that targets Symfony's bundle and kernel model, not Laravel. Laravel has no bundle registry, and the package does not provide a Laravel service provider or use Illuminate\Contracts\Cache. Use Laravel's built-in memcached cache driver instead.
How do I install mcfedr/memcached-bundle in a Laravel app?
You can install it with Composer, but Laravel will not auto-register it as a usable cache integration. The bundle expects Symfony's kernel and DI extension to create its configured Memcached service. Without a custom wrapper provider it sits outside Laravel's Cache facade and cache contract. For Laravel, set up the native memcached store in config/cache.php rather than installing this bundle.
What does mcfedr/memcached-bundle actually provide?
It is described as the smallest, simplest memcached bundle for Symfony. It wires the native PHP Memcached extension into Symfony's service container and provides configured client services, connection pooling, and ready-made cache and session handlers. Its value is Symfony-specific convenience, not a portable caching abstraction. Laravel already duplicates this surface with its Memcached connector and store.
Can I use a Symfony bundle in a Laravel application?
Not naturally. Laravel packages enter through service providers, while Symfony bundles rely on the Symfony kernel, bundle class, DI extension, and configuration tree. There is no built-in seam for mounting a Symfony bundle in Laravel without importing Symfony's DI container or hand-writing a provider. Doing that for this package would reimplement its configuration logic and add maintenance risk for no functional gain.
Does Laravel already support Memcached without this package?
Yes. Laravel's Illuminate\Cache\MemcachedConnector and MemcachedStore cover multi-server pools, SASL credentials, per-server options, key prefixing, and serializer selection. You configure a memcached store and servers array in config/cache.php and use the Cache facade as usual. That path is supported, tested, and documented for Laravel.
How do I configure Memcached caching in Laravel without mcfedr/memcached-bundle?
Use config/cache.php with a memcached store and a servers array pointing at your Memcached nodes. Set the driver to memcached and provide host, port, and weight values, plus any SASL credentials or options your environment needs. Then use Cache::remember, the Cache facade, and Laravel's cache-clearing and testing utilities as normal. This keeps your cache inside Laravel's contract with no extra package.
Is mcfedr/memcached-bundle maintained and safe for production?
The package has not had a release since May 2016 and has zero stars and zero dependents in the provided assessment. That means no compatibility testing against PHP 8.x, no Symfony 4/5/6/7 alignment, no security response path, and no issue triage. Composer audit tooling will not flag an abandoned-but-not-formally-abandoned package, so the risk is invisible to automated supply-chain checks. The MIT license makes forking legally possible, but that turns the dependency into an owned codebase.
What are the best alternatives to mcfedr/memcached-bundle for Laravel?
Laravel's native memcached cache driver is the direct alternative and covers the same Memcached client configuration needs. If you are choosing a cache substrate, evaluate Redis as a possible default for the workload rather than inheriting a 2016-era Symfony wrapper. For mixed Symfony and Laravel estates, configure each framework natively instead of sharing a Symfony bundle.
How do I test Memcached caching in Laravel if I do not use this bundle?
Use Laravel's cache testing helpers and fake the cache store so tests do not depend on a live Memcached server. Because the native driver sits behind Illuminate\Contracts\Cache, Cache::shouldReceive and related fakes work normally. A Symfony bundle service would sit outside that contract and miss Laravel's cache-clearing and testing utilities.
Can I use mcfedr/memcached-bundle for sessions in Laravel?
No, not in a supported way. The bundle provides Symfony-oriented session handlers, but Laravel's session system expects its own session drivers and handlers. Wiring the bundle's handler would bypass Laravel's session contract and framework utilities. Use Laravel's native session configuration with a supported driver instead.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core