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
0 answers

PHP Redis Config - Any time limit issue?

I'm new to redis. I'm using redis in ubuntu with PHP. My actual process is: 1) read existing records from db table and keep its key in redis db. 2) read data from a file and keep all the keys in redis. 3) compare the keys and do some process…
mockdev
  • 13
  • 3
0
votes
1 answer

How to secure Redis & Socket.IO real-time server so only authenticated users can listen?

I'm building a web app that has a chat feature. I'm using Laravel 5.4 for the backend and Angular 4 for the front-end. Everything is working (meaning I can broadcast and recieve) but I'm not at all sure how to secure it. The chat will always be 1 to…
derrickrozay
  • 1,048
  • 3
  • 15
  • 37
0
votes
1 answer

DoctrineCacheBundle: I cannot undersatand the documentation for using it with redis

As I was looking the documentation in order to figure out how to use it in order to Cache APi results. I cannot understand how to setup the configuration in order to make it work with either redis or predis. I tried the following con…
Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164
0
votes
2 answers

Can I use Redis container [Docker] as cluster?

I am using docker-compose to configure containers for my Dev Env and I have 3 containers ( nginx, php, redis ) version: '3' services: php: .. nginx: .. redis: image: redis ports: - 6379:6379 I…
Klamius
  • 167
  • 2
  • 10
0
votes
0 answers

What is a good and what is the maximum amout of keys to delete with Redis DEL?

With Redis DEL command it is possible to delete multiple keys at a time. I am using PHP's Predis Redis client and I am wondering what is a good and what is the maximum amount of keys to delete within one call?
André
  • 2,042
  • 1
  • 23
  • 26
0
votes
1 answer

Laravel not storing session data in Redis

I just decided to switch to Redis to store my session and cache data. But Laravel seems to use local file storage itself. I have installed the predis composer dependency and have changed the config…
Pritam Bohra
  • 3,912
  • 8
  • 41
  • 72
0
votes
1 answer

Redis Predis and PHP

I'm working on using Redis with Flash AS3. I've installed Redis and Predis on a Win7 environment (MSTech for the Redis) and have a RedisAs3 client. My localHost is 192.168.1.2 and I've configured Redis to listen on 127.0.0.1 and 192.168.1.2. I…
Filious
  • 107
  • 2
  • 9
0
votes
1 answer

INFO keyspace equivalent in predis

I have recently started developing a project with PHP and Redis(predis). We can see all databases and their keys by running INFO keyspace command in redis-cli. I want to know how I can get database names and their keys count with predis and PHP.…
Hoda Kh
  • 357
  • 3
  • 19
0
votes
0 answers

Homestead with Symfony 2.8 - Class Redis not found

First of all, thanks for helping me! I have this strange problem that I can't figure out how to resolve it.I am using homestead with Symfony 2.8, also, I am using redis-bundle... and I get this error "Class Redis not found.." when I try to do a…
Pocsan Jr
  • 25
  • 4
0
votes
1 answer

How to connect to the Redis database with different user?

I just started learning Redis and do not know how to change the database user. I added a user named redis while installing the redis. Here are few questions. How can I add a new user and set the password for that? How can I choose his user for…
Anil Sharma
  • 128
  • 4
  • 19
0
votes
0 answers

Redis Queue for Laravel always get filled up

I am trying to debug a bug where the application is sending the SMS twice than it supposed to. I am suspecting, it is something to do with the Queue. Now, everytime I cleared my queue on Redis, it get fills up again with old jobs. I cleared…
geckob
  • 7,680
  • 5
  • 30
  • 39
0
votes
1 answer

issue with compiling predis with hhvm as a php only extension -- RedisCluster::__construct() must be an instance of FactoryInterface, Factory given

I am using hhvm extensions api to try and build predis as a php only extension at the time of building HHVM. The purpose is to hopefully get better performance from it. After concatenating and reformatting the predis library to get it it…
Abhi
  • 1
  • 5
0
votes
1 answer

Predis using PHP: How to get which Redis node ( host ) that holds a particular key?

I'm using Redis cluster using Predis in PHP, I'm doing simple $image_urls = $client->get($key) Now I want to get the host address where Redis found the key-value pair because it also contains local images, I need to get the full link of those…
0
votes
1 answer

Laravel 5.3 and Redis (predis) - autoincrement hash and delete hash `row`

I've been flirting with Redis for a while now. I've watched these series some time ago and they were awesome. I've been through some of the documentation and the mentioning of the Time complexity of the queries blew me away, this is something that's…
dbr
  • 1,037
  • 14
  • 34
0
votes
0 answers

Setting expire in lpush predis php?

I want to set expiry for redis lpush function: $obj->lpush($key,$id); $obj->expire($key,EXPIRE_TIME); But I am getting error like: Undefined method expire() Please help me to solve this.
learner
  • 4,614
  • 7
  • 54
  • 98