1. Go to this page and download the library: Download henzeb/laravel-cache-index 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/ */
henzeb / laravel-cache-index example snippets
Cache::index('myIndex')->add('test', 'my value');
Cache::index('myIndex')->put('put', 'my value');
Cache::driver('file')->index('myIndex')->remember('filed', 'my value in file');
Cache::index('myIndex')->get('put'); // returns 'my value'
Cache::get('put'); // returns null
Cache::index('myIndex')->flush(); // only flushes keys in index
Cache::index(['myIndex', 'Read', 'Write']); // uses index name `myIndex.Read.Write`
Cache::index(['myIndex', ActionEnum::Read]); // uses index name `myIndex.Read`
Cache::index(['myIndex', new StdClass()]); // uses index name `myIndex.StdClass`
Cache::index(['myIndex', new StringableClass('stringed')]); // uses index name `myIndex.stringed`