Weave Code
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 Laravel Package

besimple/memcached

Laravel-friendly Memcached integration that simplifies using the PHP Memcached extension for caching and session storage. Provides configuration helpers and adapter glue so your app can talk to Memcached servers with minimal setup.

View on GitHub
Deep Wiki
Context7

NOT MAINTAINED

Frequently asked questions about Memcached
How do I install besimple/memcached in Laravel?
Run `composer require besimple/memcached` and register the driver in `config/cache.php` under the `stores` array. Ensure the `memcached` extension is installed via PECL (`pecl install memcached`). The package should then appear as a selectable cache driver in Laravel’s config.
Does this package support Laravel 10.x?
There’s no evidence the package is maintained for Laravel 10.x. The lack of commits or Laravel version declarations suggests it may not work out-of-the-box. Test thoroughly in a staging environment before use.
Can I use this for Laravel session storage?
Yes, if the package implements Laravel’s `SessionStore` contract, you can configure it in `config/session.php` as the driver. However, unmaintained packages risk compatibility issues with newer Laravel releases.
What’s the fallback if Memcached fails?
Laravel’s cache system supports fallbacks (e.g., `cache->store('file')`), but this package doesn’t explicitly document fallback behavior. You’d need to configure it manually in `config/cache.php` under the `default` driver settings.
Is this package faster than Redis for Laravel?
Memcached is generally faster for raw key-value operations, but Redis offers richer features (pub/sub, data structures). Without benchmarks, assume performance is comparable to native `php-memcached` but untested in Laravel’s ecosystem.
How do I configure multiple Memcached servers?
Add an array of server configurations under `servers` in `config/cache.php`. Example: `['host' => 'memcached1.example.com', 'port' => 11211, 'weight' => 50]` for each node. Weights distribute load proportionally.
Does this package support tag-based cache invalidation?
No, the package lacks Laravel’s tag-based invalidation (e.g., `Cache::tags(['users'])->flush()`). If this is critical, consider native `php-memcached` or Redis, which support it via extensions or libraries.
What are the risks of using an unmaintained package?
Critical risks include: breaking changes in Laravel 9/10+, security vulnerabilities in Memcached (e.g., CVE-2018-10933), and lack of bug fixes. Always have a fallback (e.g., Redis or native `php-memcached`) ready.
Can I use this with Docker or Kubernetes?
Yes, but you’ll need to provision Memcached containers (e.g., `docker run -d --name memcached memcached`). The package itself doesn’t include deployment tools, so configure servers manually in Laravel’s cache config.
What’s a better alternative to this package?
For Laravel, use `php-memcached` (native extension) with a custom cache driver or switch to Redis (`predis/predis` or `phpredis`). Redis has better Laravel integration, tooling, and maintenance. Only use this package if you’re locked into Memcached infrastructure.
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky