PHPackages                             avoutic/web-framework-redis - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. avoutic/web-framework-redis

ActiveLibrary

avoutic/web-framework-redis
===========================

Redis module for web-framework

3.0.0(6mo ago)03291MITPHPCI failing

Since Aug 23Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/avoutic/web-framework-redis)[ Packagist](https://packagist.org/packages/avoutic/web-framework-redis)[ Docs](https://web-framework.com)[ RSS](/packages/avoutic-web-framework-redis/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (5)Used By (1)

WebFramework Redis Module
=========================

[](#webframework-redis-module)

This module provides Redis caching integration for WebFramework.

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Redis server
- WebFramework 8.x

Installation
------------

[](#installation)

Install via Composer:

```
composer require avoutic/web-framework-redis
```

Make sure the definitions file is included in your project by adding it to `definition_files` in your `config.php` file:

```
return [
    'definition_files' => [
        '../vendor/avoutic/web-framework/definitions/definitions.php',
        '../vendor/avoutic/web-framework-redis/definitions/definitions.php',
        'app_definitions.php',
    ],
];
```

Usage
-----

[](#usage)

The module provides Redis integration for WebFramework, enabling Redis caching. It implements the WebFramework Cache interface to cache data.

To use Redis for caching you need to add it in your PHP-DI definitions:

```
return [
    Cache::class => DI\autowire(RedisCache::class),
];
```

Configuration
-------------

[](#configuration)

If you are using the definition from *definitions/defitinions.php*. You can just add the following *redis.php* to your auth config directory (*config/auth*):

```
