You can use sorted sets, and the member value to be 0 (free) or 1 (paid).
In a single key, you can store the members of the sorted set, and each member is given a decimal value. Abstracting the free
and paid
to be 0
and 1
values, you can add members (i.e. in your case, channels) to the set, and later query those.
127.0.0.1:6379> ZADD mychannels 0 1stchannel 1 2ndchannel 1 3rdchannel 0 4thchannel
(integer) 4
127.0.0.1:6379> ZRANGEBYSCORE mychannels 0 0 /* Querying free channels */
1) "1stchannel"
2) "4thchannel"
127.0.0.1:6379> ZRANGEBYSCORE mychannels 1 1 /* Querying paid channels */
1) "2ndchannel"
2) "3rdchannel"