PHP code example of macpaw / redis-schema-bundle

1. Go to this page and download the library: Download macpaw/redis-schema-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

macpaw / redis-schema-bundle example snippets


// config/bundles.php
return [
    Macpaw\SchemaContextBundle\SchemaContextBundle::class => ['all' => true],
    Macpaw\RedisSchemaBundle\RedisSchemaBundle::class => ['all' => true],
];

public function __construct(private CacheInterface $cache) {}

public function save(): void
{
    $this->cache->get('user.123', function () {
        return 'value';
    });
}