sfneal/redis-helpers

Redis helper functions for improved Redis cache transactions with PHP applications.
145,583
Install
composer require sfneal/redis-helpers
Latest Version:3.0.0
PHP:^8.0|^8.1|^8.2|^8.3
License:MIT
Last Updated:Jan 19, 2026
Links: GitHub  ·  Packagist
Maintainer: sfneal

Redis Helpers

Packagist PHP support Latest Version on Packagist Build Status StyleCI Scrutinizer Code Quality Total Downloads

Redis helper functions for improved Redis cache transactions with PHP applications

Installation

You can install the package via composer:

composer require sfneal/redis-helpers

In order to autoload to the helper functions add the following path to the autoload.files section in your composer.json.

"autoload": {
    "files": [
        "vendor/sfneal/redis-helpers/src/redis.php"
    ]
},

To modify the redis-helpers 'prefix' & 'ttl' setting publish the ServiceProvider & modify the config.

php artisan vendor:publish --provider="Sfneal\Helpers\Redis\Providers\RedisHelpersServiceProvider"

Usage

# Add a key value pair to the cache
RedisCache::set('pastrnak', 88);

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email stephen.neal14@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

PHP Package Boilerplate

This package was generated using the PHP Package Boilerplate.

Related Packages

sfneal/caching

Traits & interfaces for utilizing cache mechanisms to store frequently retrieved...

117,701 1
sfneal/queueables

Abstraction layers for creating Jobs & Queueable's in Laravel applications

109,753 0
sfneal/models

Eloquent Model wrapper with extended functionality

98,220 1
sfneal/controllers

Opinionated Laravel Controllers extension

74,050 0
sfneal/laravel-helpers

Helper functions for Laravel applications

146,004 1