Comments (2)
i got the solution, the $key i have given, doesn't exist.
Anyway, i didn't suppose to receive an Exception, if the $key doesn't exist.
from predis.
Sorry for the late reply. If $key
does not exist, Redis returns an empty set. If you got a -ERR
response from Redis (which translates to a PHP exception on the client side) saying that you were performing an operation against a key with the wrong value when issuing SMEMBERS
, it means that the type of $key
was not a set but something else (e.g. string
or zset
):
redis 127.0.0.1:6379> SMEMBERS metavars
(empty list or set)
redis 127.0.0.1:6379> SET metavars foobar
OK
redis 127.0.0.1:6379> TYPE metavars
string
redis 127.0.0.1:6379> SMEMBERS metavars
(error) ERR Operation against a key holding the wrong kind of value
``
from predis.
Related Issues (20)
- Get from local cache
- Determine internal format of the cache (i.e is it key of value/expiration pairs, or something else)
- Save in local cache (presumably with an expiration)
- Cache configuration objects (to support memory, number of keys, etc)
- [v3] cherry-pick opt out setinfo for v3 HOT 1
- Update CLIENT-SETINFO to support suffixes HOT 1
- Missing BITFIELD_RO support HOT 1
- psubscribe seems to swallow exit, exceptions, disconnect, quit calls HOT 4
- Add support for GEOSHAPE index fields and WITHIN and CONTAINS query operators
- Error while writing bytes to the server HOT 3
- Error on RPOP expects exactly 1 argument, 2 given HOT 2
- Explain `expireResoluton` for `SET` HOT 1
- Improve connection speed by running fewer commands
- Question: the `ClientInterface::eval` signature and PhpRedis HOT 1
- Connect to Sentinel with username: how to implement right ? HOT 3
- Add support for HSCAN [NOVALUES]
- Add command filter for CLIENT KILL to support maximum age via [MAXAGE] option
- Support XREAD, XREADGROUP reading from last message of stream
- Supporting redis unstable commands
- Consider master-link-status state when selecting slaves
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 predis.