Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FcPhp Redis

Package to manage Redis

Build Status codecov Total Downloads

How to install

Composer:

$ composer require 00f100/fcphp-redis

or add in composer.json

{
    "require": {
        "00f100/fcphp-redis": "*"
    }
}

How to use

<?php

/**
 * Method to construct instance of Redis
 *
 * @param string $host Host to connect Redis server
 * @param string $port Port of Redis server
 * @param string $password Password of Redis server
 * @param int $timeout Timeout of try connect
 * @return void
 */
$redis = RedisFacade::getInstance(string $host, string $port, string $password = null, int $timeout = 100);

Example

<?php

use FcPhp\Redis\Facades\RedisFacade;

$redis = RedisFacade::getInstance('127.0.0.1', '6379', null, 100);

$redis->set('key', 'content');

echo $redis->get('key');
// Print: content

print_r($redis->keys('*'));
// List all keus into array

$redis->delete('key');
// Delete key

About

Package to manipulate Redis

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages