lbalaceanu left a comment (kamailio/kamailio#4306)

Sorry for not making this clearer.

Until now, when using usrloc + redis, when 497xxxxxxxxx @ domain would 
register, then the following data structs would be created:

HASH "location:entry::uloc-686296ea-5773d-1" -> contact info
SET "location:usrdom::497xxxxxxxxx:domain" -> contains 
"location:entry::uloc-686296ea-5773d-1" , but might have more entries
SET "location::index::usrdom" -> contains 
"location:usrdom::497xxxxxxxxx:domain" etc
SET "location:timer::2025-06-30 17:54:03" 
"location:entry::uloc-686296ea-5773d-1"
SET "location::index::timer" "location:timer::2025-06-30 17:54:03"

This commit changes all the sets to hashes, the keys being the previous entries 
in the hashes.
We do this because from v7.4 on, Redis allows auto-expiry on key level.
With this patch we set expires on location:entry::uloc-686296ea-5773d-1 itself 
and on its corresponding keys in "location:usrdom::497xxxxxxxxx:domain",  
"location::index::usrdom", "location:timer::2025-06-30 17:54:03" , 
"location::index::timer".

We saw this also as a relatively low hanging fruit since there was a todo 
comment in the db_redis code stating:  
// TODO: utilize auto-expiry? on insert/update, also update expire value
// of mappings

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4306#issuecomment-3032743459
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/4306/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to