rlm_cache filtering

Jorge Pereira jpereira at freeradius.org
Mon Jul 15 20:03:12 CEST 2019


The "sql" is executed from each statement? so, please share your debug
output. https://wiki.freeradius.org/guide/radiusd-X

On Mon, Jul 15, 2019 at 11:35 AM liran kessel <lirankessel at gmail.com> wrote:

> I have activated rlm_cache so as to reduce the amount of times the
> freeradius will query the DB.
> I made the Calling-Station-Id the cache key and have added this code to
> the accounting section:
>
> cache
>        if (ok){
>                sql
>                }
>        else   {
>                        if ("%{sql:select case when exists(select * from
> [TABLE_NAME] where ne_id='%{Calling-Station-Id}') then 1 else 0 end}" == 1){
>                        sql
>                        }
>                }
>
> However what happens is that all Calling-Station-Ids are stored to the
> cache and so the 2nd time I get a packet they execute the sql module.
> How can I configure filtering of the cache in the “else” section so as to
> decide which Calling-Station-Id to save in cache and which not?
>
>
> Thanks
> Liran
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list