PHPackages                             ruvents/spiral-cache - 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. [Caching](/categories/caching)
4. /
5. ruvents/spiral-cache

ActiveLibrary[Caching](/categories/caching)

ruvents/spiral-cache
====================

PSR-{6,16} compatible cache integration

0.1.0(4y ago)02.6k↑50%MITPHPPHP ^8.0

Since Dec 17Pushed 4y ago3 watchersCompare

[ Source](https://github.com/ruvents/spiral-cache)[ Packagist](https://packagist.org/packages/ruvents/spiral-cache)[ RSS](/packages/ruvents-spiral-cache/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (2)Used By (0)

Spiral cache
============

[](#spiral-cache)

This package integrates PSR-6 and PSR-16 compatible cache implementations (mostly Symfony one) into Spiral application. As a bonus it provides convenient caching solution for HTTP responses.

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

[](#installation)

```
composer require ruvents/spiral-cache symfony/cache:^5.0 psr/simple-cache
```

`psr/simple-cache` is optional, you can only use PSR-6 compliant cache.

`symfony/cache` is optional, you can use any PSR-6 implementation of your choice.

Then add `CacheBootloader` to your `App.php`:

```
use Ruvents\SpiralCache\CacheBootloader;

class App extends Kernel
{
    protected const LOAD = [
        ...
        CacheBootloader::class,
    ]
}
```

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

[](#configuration)

Put the following code into file `app/config/cache.php`:

```
