Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Latest commit

 

History

History
56 lines (36 loc) · 1.53 KB

File metadata and controls

56 lines (36 loc) · 1.53 KB
code type title description
true
page
sdiffstore
MemoryStorage:sdiffstore

sdiffstore

Computes the difference between the set of unique values stored at key and the other provided sets, and stores the result in the key stored at destination.

If the destination key already exists, it is overwritten.

[Redis documentation]


sdiffstore(key, keys, destination, [options], [callback])

Arguments Type Description
key string Key identifier to compare
keys array list of set keys to compare with the set stored at key
destination string Destination key identifier
options JSON Object Optional parameters
callback function Callback

Options

Option Type Description Default
queuable boolean Make this request queuable or not true

Return Value

Returns the MemoryStorage object to allow chaining.


Callback Response

Returns an integer containing the number of stored elements.

Usage

<<< ./snippets/sdiffstore-1.php

Callback response:

3