Comments (5)
Generally speaking, your string should be quoted in the command()
string, so $redis->command('set test "' . $value . '"');
would be your function call.
That said, using command()
is not the preferred method of using CI-Redis - instead, use $redis->set('test', $value);
and the class will take care of all the escaping and other such tricks on your behalf.
from codeigniter-redis.
(Also, it should be $this->redis->set(...)
instead of $redis->set(...)
, but I'm guessing you know that, working with CI...)
from codeigniter-redis.
Thank you very much, dumb of me, I should have tried using the set
function in the first place, worked perfectly.
About the use of $redis->...
instead of $this->redis->...
was because I implemented a constructor in the library and was using the $redis variable for the object:
$redis = new CI_Redis();
from codeigniter-redis.
I noticed that setting a json as a value went good.
However when I try to get it, the response becomes truncated (no fixed size), one with more than 3500 characters came good but other with 2800 was truncated.
Looking at the database through the terminal I can see that the values are indeed complete so the truncation process may be happening in the parser that receives the 'get' call back to CodeIgniter.
from codeigniter-redis.
from codeigniter-redis.
Related Issues (20)
- _auth returns "invalid password" when $password === '' HOT 3
- In the Constructor, connection error should show $config['port'] HOT 1
- Some data does not properly return from redis HOT 6
- test_empty_hash_values fails after changing bulk reply code HOT 8
- The library sometimes returns OK when getting data HOT 3
- Unable to connect to redis with a correct password HOT 7
- Cannot get limit to work - could be related to spaces?
- mget have no return and aways waiting
- _multi_bulk_reply is not working
- Redis pipeline - batch get HOT 4
- multi & exec hmget failed HOT 5
- method _bulk_reply is not returning the correct data HOT 3
- Deprecating this library HOT 2
- No way to check if redis is running HOT 4
- Any Support for Codeigniter 3+
- 使用scan命令时返回值出错
- How can i set time for expire. HOT 3
- $this->redis->command('PING'); Error :: command On null()
- How can i use this in cli? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeigniter-redis.