rekalogika/psr-16-simple-cache-bundle

Enables PSR-16 Simple Cache services in Symfony that were previously removed in Symfony 4.3. Just wire in Psr\SimpleCache\CacheInterface to use it.

Maintainers

Package info

github.com/rekalogika/psr-16-simple-cache-bundle

Homepage

Type:symfony-bundle

pkg:composer/rekalogika/psr-16-simple-cache-bundle

Fund package maintenance!

priyadi

Statistics

Installs: 8 648

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 2

1.2.0 2024-09-16 15:21 UTC

README

Enables PSR-16 Simple Cache services in Symfony projects. These were previously enabled in the older Symfony version but were removed in 4.3.

Synopsis

use Psr\SimpleCache\CacheInterface;

class SomeService
{
    public function __construct(private CacheInterface $cache)
    {
    }

    public function doSomething()
    {
        $this->cache->set('foo', 'bar');
    }
}

Documentation

rekalogika.dev/psr-16-simple-cache-bundle

Credits

This package is just a service definition. The actual implementation is done by the Symfony project; they just don't make the service available by default.

License

MIT

Contributing

Issues and pull requests should be filed in the GitHub repository rekalogika/psr-16-simple-cache-bundle.