Boost your Laravel app's speed and simplicity with Zentropy, a lightweight Redis alternative. No more setup headaches.
What is Zentropy?
Zentropy is a high-performance key-value store that can be used as a replacement for Redis. It supports both TCP connections with optional authentication and Unix socket connections, providing maximum flexibility for developers.
With the Zentropy Laravel wrapper, you can integrate it seamlessly into your Laravel applications, using familiar Facade syntax or dependency injection.
Install Zentropy
Download the latest release from the official GitHub repository:
https://github.com/mailmug/zentropy/releasesExtract the zip file for your operating system.
-
Run the binary from your terminal:
./zentropy
Run as a Service (Recommended for Production): For a production environment, you should configure it to run as a system service (e.g., using
systemd
on Linux) so it starts automatically on boot.
Getting Started with Zentropy Laravel
Install the package
composer require mailmug/zentropy-laravel
Publish the Configuration
php artisan vendor:publish --provider="MailMug\ZentropyLaravel\ZentropyWrapperServiceProvider" --tag="config"
Sample Controller
use MailMug\ZentropyLaravel\Facades\Zentropy;
class UserController extends Controller
{
public function index(){
Zentropy::set('users', User::get());
// Set a value
Zentropy::set('foo', 'bar');
// Get a value
$value = Zentropy::get('foo');
// Delete a key
Zentropy::delete('foo');
}
}
Top comments (0)