Questions tagged [predis]

Predis is a flexible and feature-complete PHP client library for the Redis key-value store.

Predis requires PHP >= 5.3 and it is entirely written in PHP.

It can be used without the need to build and install a native extension for the interpreter, making it also easier and faster to add new features which is great given how fast the development of Redis proceeds.

Speed up Predis

  • support HHVM >= 2.4.0
  • can be paired with a C extension phpiredis

Frameworks integration

Useful links

254 questions
0
votes
1 answer

What is the correct way to update / delete / insert a record into MySQL and Predis together in Laravel

I am starting with Laravel Predis and Redis. The question is, what's the best way to handle a update in Laravel and Redis together? Is this the best way or can t be done simpler? Eloquent update: $article = Article::find(1); $article->title …
Bas
  • 2,330
  • 4
  • 29
  • 68
0
votes
1 answer

How can I update or delete a record from the JSON output using Laravel and Predis

I started a few months ago with Laravel and I want to implement Redis. How and what is the best way to update or delete 1 or more records from $test. $allarticles = Article::all(); $client = Redis::connection(); $client->set('articles',…
Bas
  • 2,330
  • 4
  • 29
  • 68
0
votes
3 answers

Laravel Predis update/delete 1 key in array

For example i have an array/json with 100000 entries cached with Redis / Predis. Is it posible to update or delete 1 or more entries or do i have to generate the whole array/json of 100000 entries? And how can I achieve that?
Bas
  • 2,330
  • 4
  • 29
  • 68
0
votes
1 answer

PHP predis connect to Redis Sentinel

I've set up a new PHP predis connection to a redis server using the documented code. I can verify it's connected ok, but I don't know how to simply test if the connection exists. $options = array( 'scheme' => 'tcp', 'host' => '127.0.0.1', …
user101289
  • 9,888
  • 15
  • 81
  • 148
0
votes
1 answer

How to verify client side partitioning with Predis

I am attempting to use client side partitioning via Predis. Everything seems to be working, but how can I verify values are being stored on multiple servers? I'd like to be able to list all keys on each server, but don't see how to in the predis…
Alan
  • 702
  • 6
  • 14
0
votes
2 answers

Predis. How to set Cyrillic key?

I trying to execute next command. Redis::hincrby('sentiment_combined:positive', 'рыжий кот', 1); This command works perfectly for latin keys, for example 'orange cat'. But with 'рыжий кот' I have next error: [Predis\Response\ServerException] …
Nick
  • 9,735
  • 7
  • 59
  • 89
0
votes
1 answer

PHP Predis: How to convert `redis-cli script load $LUA_SCRIPT` into Predis methods?

How to convert redis-cli script load $LUA_SCRIPT into Predis methods? Follow is the lua script: local lock_key = 'icicle-generator-lock' local sequence_key = 'icicle-generator-sequence' local logical_shard_id_key =…
AarioAi
  • 563
  • 1
  • 5
  • 18
0
votes
0 answers

Predis installation and configuration

I installed Predis on Ubuntu and when I try to connect I get the error: PHP Fatal error: Class 'Predis\Client' not found in /dir/. I have moved the installation to different directories, and moved my php script to different directories as well, but…
0
votes
2 answers

How to fetch related data in Redis,Predis?

I working on web application which uses mysql as backend and redis as caching server and i stored the records in mysql database as well as redis(using predis library). During fetching the records from database,first check whether the key…
Aniket Muruskar
  • 267
  • 3
  • 9
0
votes
1 answer

Where do cache calls go in MVC

So I'm adding Redis to an already developed project and I'm wondering where exactly to put these cache calls. There are existing models, and I am wondering if I can just inject redis into the models and then wrap each query with cache code, like…
Donal.Lynch.Msc
  • 3,365
  • 12
  • 48
  • 78
0
votes
2 answers

Setting cache timeout to a key in Codeigniter using predis package

In Codeigniter, I've installed predis package using Composer. I'm able to set and get the value from cache using this package. My requirement is I need to keep the value in cache using Redis for 1 min. I have seen different options setting through…
Haz Pro
  • 216
  • 2
  • 11
0
votes
0 answers

Predis. ¿how can i save the keys?

php code: 'tcp', 'host' => 'localhost', 'port' => '6379', 'password => 'test' )); for($i=0;$i<10;$i++){ …
Daniel García
  • 329
  • 1
  • 2
  • 10
0
votes
1 answer

How to install Predis on app service?

I am using azure app service My application requires Predis extension to be installed on the server, how can I have it installed on App services? Application is in PHP.
Ruchit Rami
  • 2,273
  • 4
  • 28
  • 53
0
votes
2 answers

Call a redis command outside of transaction context

Is it possible to call a predis command outside of transaction context? I mean to exec hget or hexist while a transaction is opened
MrBinWin
  • 1,269
  • 1
  • 16
  • 30
0
votes
2 answers

Predis configuration in Laravel 5.2

I am confused about the Predis setup (PHP client for Redis) in this case in a Laravel 5.2 project. The documentation says you need to autoload it into composer to use it in the entire app without loading it on each page... HOW? WHERE? WHAT? do I…
nclsvh
  • 2,628
  • 5
  • 30
  • 52