• Czas czytania ~2 min
  • 11.07.2023

Pakiet Roadrunner KV Cache dla Laravel umożliwia pracę z wtyczką Key-Value RoadRunner jako sterownikiem pamięci podręcznej:

use Illuminate\Support\Facades\Cache;

// Default main store - rr-memory
Cache::driver()->get('key');

// rr-boltdb store
Cache::driver('rr-boltdb')->get('key');

Wtyczka Key-Value umożliwia przechowywanie dowolnych danych wewnątrz RoadRunner między różnymi żądaniami HTTP lub innymi typami aplikacji, takimi jak CLI.

Dzięki Roadrunner ten pakiet obsługuje pamięć masową w pamięci i sterownik, boltdb jeśli potrzebujesz trwałej pamięci masowej. Obsługuje również szyfrowaną serializację end-to-end, jeśli masz dane, które mogą zawierać poufne informacje, takie jak osobiste dane użytkownika.

Podobnie jak każdy sterownik pamięci podręcznej, możesz skonfigurować wiele opcji za pomocą sterownika klucz-wartość RoadRunner. Oto kilka przykładowych opcji konfiguracji z przykładów konfiguracji pamięci podręcznej w pliku readme:Możesz dowiedzieć się więcej o tym pakiecie, uzyskać pełne instrukcje instalacji i wyświetlić kod źródłowy w witrynie GitHub.Here are some example configuration options from the cache config examples in the readme:

<?php
return [
    'default' => 'rr-memory', // Default store (optional)

    'stores' => [
        'rr-memory' => [ // Custom store name with "memory" connection
            'driver' => 'roadrunner',
            'connection' => 'memory', // section name from KV plugin settings in RoadRunner config file (.rr.yaml)
            'serializer' => null, // Available options: null|igbinary
            'encryption_key' => null, // Available options: null|string
        ],
        'rr-memory-igbinary-encrypted' => [ // Custom store name with "memory" connection and encrypted "igbinary" serializer
            'driver' => 'roadrunner',
            'connection' => 'memory', // section name from KV plugin settings in RoadRunner config file (.rr.yaml)
            'serializer' => 'igbinary', // Available options: null|igbinary
            'encryption_key' => 'key1', // Available options: null|string
        ],
         'rr-memory-encrypted' => [ // Custom store name with "memory" connection and encrypted serializer
            'driver' => 'roadrunner',
            'connection' => 'memory', // section name from KV plugin settings in RoadRunner config file (.rr.yaml)
            'serializer' => null, // Available options: null|igbinary
            'encryption_key' => 'key2', // Available options: null|string
        ],
    ],
],

You can learn more about this package, get full installation instructions, and view the source code on GitHub.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

O

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

O autorze CrazyBoy49z
WORK EXPERIENCE
Kontakt
Ukraine, Lutsk
+380979856297