- cleanup existing sht_rm_name_re and sht_rm_value_re functions - update documention You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1121
-- Commit Summary --
* htable: add new functions sht_rm_name_re_pv and sht_rm_value_pv to
-- File Changes --
M src/modules/htable/doc/htable.xml (11) M src/modules/htable/doc/htable_admin.xml (22) M src/modules/htable/htable.c (88)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1121.patch https://github.com/kamailio/kamailio/pull/1121.diff
Can you provide more details about this patch? The description in the commit message and in the pull request is not saying that much.
problem scenario is: need to clear htable cache dynamically (using an event-route + nsq message) but `sht_rm_name_re` and `sht_rm_value_re` do not support variables as parameters. solution in patch: allow variables by adding a 2nd parameter to each function if called with one parameter like `sht_rm_value_re("ha=>.*");` traditional behavior is executed. if passing a 2nd parameter like `sht_rm_value_re("$var(htable)", ".*$var(match)"); ` new behavior is executed which allows variables. I hope that makes sense.
Closed #1121.
I pushed a different implementation, with new functions, that allow extending it for other types of matching. For now implements the regexp - 0c69e7bc4486ff6b10da6502b72c1805ac6e5f83 .