SparkRedis

Provides access to the Games Redis Instance.

Rather than copy and paste the excellent documentation from the Redis site, we've opted to link to the relevant page through the documentation.

e.g.

var redis = Spark.getRedis();

append

signature append(string key, string value)

returns number

See http://redis.io/commands/append

bitcount

signature bitcount(string key)

returns number

See http://redis.io/commands/bitcount

signature bitcount(string key, number start, number end)

returns number

See http://redis.io/commands/bitcount

bitop

signature bitop(string op, string destKey, string[] srcKeys)

returns number

See http://redis.io/commands/bitop

decr

signature decr(string key)

returns number

See http://redis.io/commands/decr

decrBy

signature decrBy(string key, number integer)

returns number

See http://redis.io/commands/decrBy

del

signature del(string[] keys)

returns number

See http://redis.io/commands/del

exists

signature exists(string key)

returns boolean

See http://redis.io/commands/exists

expire

signature expire(string key, number seconds)

returns number

See http://redis.io/commands/expire

expireAt

signature expireAt(string key, number unixTime)

returns number

See http://redis.io/commands/expireAt

flushdb

signature flushdb()

returns string

See http://redis.io/commands/flushdb

geoadd

signature geoadd(string dstkey, JSON memberCoordinateMap)

returns number

See http://redis.io/commands/geoadd

geodist

signature geodist(string dstkey, string member1, string member2, string unit)

returns number

See http://redis.io/commands/geodist

geohash

signature geohash(string dstkey, string[] members)

returns JSON

See http://redis.io/commands/geohash

geopos

signature geopos(string dstkey, string[] members)

returns JSON

See http://redis.io/commands/geopos

georadius

signature georadius(string dstkey, number longitude, number latitude, number radius, string unit, JSON params)

returns JSON

See http://redis.io/commands/georadius

georadiusbymember

signature georadiusbymember(string dstkey, string member, number radius, string unit, JSON params)

returns JSON

See http://redis.io/commands/georadiusbymember

get

signature get(string key)

returns string

See http://redis.io/commands/get

getbit

signature getbit(string key, number offset)

returns boolean

See http://redis.io/commands/getbit

getrange

signature getrange(string key, number startOffset, number endOffset)

returns string

See http://redis.io/commands/getrange

hdel

signature hdel(string key, string[] fields)

returns number

See http://redis.io/commands/hdel

hexists

signature hexists(string key, string field)

returns boolean

See http://redis.io/commands/hexists

hget

signature hget(string key, string field)

returns string

See http://redis.io/commands/hget

hgetAll

signature hgetAll(string key)

returns string[]

See http://redis.io/commands/hgetAll

hincrBy

signature hincrBy(string key, string field, number value)

returns number

See http://redis.io/commands/hincrBy

hincrByFloat

signature hincrByFloat(string key, string field, number increment)

returns number

See http://redis.io/commands/hincrByFloat

hkeys

signature hkeys(string key)

returns string[]

See http://redis.io/commands/hkeys

hlen

signature hlen(string key)

returns number

See http://redis.io/commands/hlen

hmget

signature hmget(string key, string[] fields)

returns string[]

See http://redis.io/commands/hmget

hmset

signature hmset(string key, JSON hash)

returns string

See http://redis.io/commands/hmset

hset

signature hset(string key, string field, string value)

returns number

See http://redis.io/commands/hset

hsetnx

signature hsetnx(string key, string field, string value)

returns number

See http://redis.io/commands/hsetnx

hvals

signature hvals(string key)

returns string[]

See http://redis.io/commands/hvals

incr

signature incr(string key)

returns number

See http://redis.io/commands/incr

incrBy

signature incrBy(string key, number integer)

returns number

See http://redis.io/commands/incrBy

incrByFloat

signature incrByFloat(string key, number increment)

returns number

See http://redis.io/commands/incrByFloat

keys

signature keys(string pattern)

returns string[]

See http://redis.io/commands/keys

lindex

signature lindex(string key, number index)

returns string

See http://redis.io/commands/lindex

linsert

signature linsert(string key, string where, string pivit, string value)

returns number

See http://redis.io/commands/linsert

llen

signature llen(string key)

returns number

See http://redis.io/commands/llen

lpop

signature lpop(string key)

returns string

See http://redis.io/commands/lpop

lpush

signature lpush(string key, string[] strings)

returns number

See http://redis.io/commands/lpush

lpushx

signature lpushx(string key, string[] strings)

returns number

See http://redis.io/commands/lpushx

lrange

signature lrange(string key, number start, number end)

returns string[]

See http://redis.io/commands/lrange

lrem

signature lrem(string key, number count, string value)

returns number

See http://redis.io/commands/lrem

lset

signature lset(string key, number index, string value)

returns string

See http://redis.io/commands/lset

ltrim

signature ltrim(string key, number start, number end)

returns string

See http://redis.io/commands/ltrim

mget

signature mget(string[] keys)

returns string[]

See http://redis.io/commands/mget

mset

signature mset(string[] keysvalues)

returns string

See http://redis.io/commands/mset

msetnx

signature msetnx(string[] keysvalues)

returns number

See http://redis.io/commands/msetnx

persist

signature persist(string key)

returns number

See http://redis.io/commands/persist

pexpire

signature pexpire(string key, number milliseconds)

returns number

See http://redis.io/commands/pexpire

pexpireAt

signature pexpireAt(string key, number millisecondsTimestamp)

returns number

See http://redis.io/commands/pexpireAt

psetex

signature psetex(string key, number milliseconds, string value)

returns string

See http://redis.io/commands/psetex

pttl

signature pttl(string key)

returns number

See http://redis.io/commands/pttl

rename

signature rename(string oldkey, string newkey)

returns string

See http://redis.io/commands/rename

renamenx

signature renamenx(string oldkey, string newkey)

returns number

See http://redis.io/commands/renamenx

rpop

signature rpop(string key)

returns string

See http://redis.io/commands/rpop

rpoplpush

signature rpoplpush(string srckey, string dstkey)

returns string

See http://redis.io/commands/rpoplpush

rpush

signature rpush(string key, string[] strings)

returns number

See http://redis.io/commands/rpush

rpushx

signature rpushx(string key, string[] strings)

returns number

See http://redis.io/commands/rpushx

sadd

signature sadd(string key, string[] members)

returns number

See http://redis.io/commands/sadd

scard

signature scard(string key)

returns number

See http://redis.io/commands/scard

sdiff

signature sdiff(string[] keys)

returns string[]

See http://redis.io/commands/sdiff

sdiffstore

signature sdiffstore(string dstkey, string[] keys)

returns number

See http://redis.io/commands/sdiffstore

getSet

signature getSet(string key, string value)

returns string

See http://redis.io/commands/getSet

set

signature set(string key, string value, string nxxx, string expx, number time)

returns string

See http://redis.io/commands/set

signature set(string key, string value)

returns string

See http://redis.io/commands/set

signature set(string key, string value, string nxxx, string expx, number time)

returns string

See http://redis.io/commands/set

signature set(string key, string value, string nxxx)

returns string

See http://redis.io/commands/set

setbit

signature setbit(string key, number offset, boolean value)

returns boolean

See http://redis.io/commands/setbit

setex

signature setex(string key, number seconds, string value)

returns string

See http://redis.io/commands/setex

setnx

signature setnx(string key, string value)

returns number

See http://redis.io/commands/setnx

setrange

signature setrange(string key, number offset, string value)

returns number

See http://redis.io/commands/setrange

sinter

signature sinter(string[] keys)

returns string[]

See http://redis.io/commands/sinter

sinterstore

signature sinterstore(string dstkey, string[] keys)

returns number

See http://redis.io/commands/sinterstore

sismember

signature sismember(string key, string member)

returns boolean

See http://redis.io/commands/sismember

smembers

signature smembers(string key)

returns string[]

See http://redis.io/commands/smembers

smove

signature smove(string srckey, string dstkey, string member)

returns number

See http://redis.io/commands/smove

sort

signature sort(string key)

returns string[]

See http://redis.io/commands/sort

signature sort(string key, string dstkey)

returns number

See http://redis.io/commands/sort

spop

signature spop(string key)

returns string

See http://redis.io/commands/spop

srandmember

signature srandmember(string key)

returns string

See http://redis.io/commands/srandmember

signature srandmember(string key, number count)

returns string[]

See http://redis.io/commands/srandmember

srem

signature srem(string key, string[] members)

returns number

See http://redis.io/commands/srem

strlen

signature strlen(string key)

returns number

See http://redis.io/commands/strlen

substr

signature substr(string key, number start, number end)

returns string

See http://redis.io/commands/substr

sunion

signature sunion(string[] keys)

returns string[]

See http://redis.io/commands/sunion

sunionstore

signature sunionstore(string dstkey, string[] keys)

returns number

See http://redis.io/commands/sunionstore

ttl

signature ttl(string key)

returns number

See http://redis.io/commands/ttl

type

signature type(string key)

returns string

See http://redis.io/commands/type

zadd

signature zadd(string key, number score, string member)

returns number

See http://redis.io/commands/zadd

zcard

signature zcard(string key)

returns number

See http://redis.io/commands/zcard

zcount

signature zcount(string key, string min, string max)

returns number

See http://redis.io/commands/zcount

signature zcount(string key, number min, number max)

returns number

See http://redis.io/commands/zcount

zincrby

signature zincrby(string key, number score, string member)

returns number

See http://redis.io/commands/zincrby

zinterstore

signature zinterstore(string dstkey, string[] sets)

returns number

See http://redis.io/commands/zinterstore

zrange

signature zrange(string key, number start, number end)

returns string[]

See http://redis.io/commands/zrange

zrangeByScore

signature zrangeByScore(string key, string min, string max, number offset, number count)

returns string[]

See http://redis.io/commands/zrangeByScore

signature zrangeByScore(string key, string min, string max)

returns string[]

See http://redis.io/commands/zrangeByScore

signature zrangeByScore(string key, number min, number max, number offset, number count)

returns string[]

See http://redis.io/commands/zrangeByScore

signature zrangeByScore(string key, number min, number max)

returns string[]

See http://redis.io/commands/zrangeByScore

zrangeByScoreWithScores

signature zrangeByScoreWithScores(string key, number min, number max, number offset, number count)

returns JSON

See http://redis.io/commands/zrangeByScoreWithScores

signature zrangeByScoreWithScores(string key, string min, string max)

returns JSON

See http://redis.io/commands/zrangeByScoreWithScores

signature zrangeByScoreWithScores(string key, number min, number max)

returns JSON

See http://redis.io/commands/zrangeByScoreWithScores

signature zrangeByScoreWithScores(string key, string min, string max, number offset, number count)

returns JSON

See http://redis.io/commands/zrangeByScoreWithScores

zrangeWithScores

signature zrangeWithScores(string key, number start, number end)

returns JSON

See http://redis.io/commands/zrangeWithScores

zrank

signature zrank(string key, string member)

returns number

See http://redis.io/commands/zrank

zrem

signature zrem(string key, string[] members)

returns number

See http://redis.io/commands/zrem

zremrangeByRank

signature zremrangeByRank(string key, number start, number end)

returns number

See http://redis.io/commands/zremrangeByRank

zremrangeByScore

signature zremrangeByScore(string key, string start, string end)

returns number

See http://redis.io/commands/zremrangeByScore

signature zremrangeByScore(string key, number start, number end)

returns number

See http://redis.io/commands/zremrangeByScore

zrevrange

signature zrevrange(string key, number start, number end)

returns string[]

See http://redis.io/commands/zrevrange

zrevrangeByScore

signature zrevrangeByScore(string key, number max, number min, number offset, number count)

returns string[]

See http://redis.io/commands/zrevrangeByScore

signature zrevrangeByScore(string key, string max, string min, number offset, number count)

returns string[]

See http://redis.io/commands/zrevrangeByScore

signature zrevrangeByScore(string key, string max, string min)

returns string[]

See http://redis.io/commands/zrevrangeByScore

signature zrevrangeByScore(string key, number max, number min)

returns string[]

See http://redis.io/commands/zrevrangeByScore

zrevrangeByScoreWithScores

signature zrevrangeByScoreWithScores(string key, string max, string min)

returns JSON

See http://redis.io/commands/zrevrangeByScoreWithScores

signature zrevrangeByScoreWithScores(string key, string max, string min, number offset, number count)

returns JSON

See http://redis.io/commands/zrevrangeByScoreWithScores

signature zrevrangeByScoreWithScores(string key, number max, number min)

returns JSON

See http://redis.io/commands/zrevrangeByScoreWithScores

signature zrevrangeByScoreWithScores(string key, number max, number min, number offset, number count)

returns JSON

See http://redis.io/commands/zrevrangeByScoreWithScores

zrevrangeWithScores

signature zrevrangeWithScores(string key, number start, number end)

returns JSON

See http://redis.io/commands/zrevrangeWithScores

zrevrank

signature zrevrank(string key, string member)

returns number

See http://redis.io/commands/zrevrank

zscore

signature zscore(string key, string member)

returns number

See http://redis.io/commands/zscore

zunionstore

signature zunionstore(string dstkey, string[] sets)

returns number

See http://redis.io/commands/zunionstore

Did this page help you? Please enter your feedback below. For questions about using this part of the platform, please contact support here