Conversation
|
Let's separate the docs update and the addition of |
0d32aba to
38b0aaa
Compare
|
Now, It works like that We have two additional keys, The But, maybe we need to add an ability to set an argument to methods Also, if a channel/subscription is deleted, it will remove this key from |
…ng created_time of subscriptions and channels
38b0aaa to
99f9ec4
Compare
…onds" as argument
99f9ec4 to
aab684c
Compare
Here was added a new HASH key
objects:list-created-timesAfter creating subscriptions (and channels later), we will add a subscription's name and the current time to this hash.
We will use it in
GraphQL::AnyCable::Cleanerto remove the old keys, who hascreated_time + config.subscription_expiration_secondsBut there is one problem.
If we have
config.subscription_expiration_seconds, we will set EXPIRE hereIt means that when Redis destroys this key, this key will remain storing in
objects:list-created-timeshashI also considered a separate key, something like this
In other words, every
subscriptionhad a Redis key, where has a nametime:#{subscription_key_name}and value as thecurrent dateBut I refused this idea because it creates a lot of records in Redis (one subscription = one
time:subscription), but there was a plus - we could setexpirefor every keyThis is not the final PR