rlm_cache

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Sep 27 23:29:45 CEST 2012


On 27 Sep 2012, at 21:59, "Franks Andy \(RLZ\) IT Systems Engineer" <Andy.Franks at sath.nhs.uk> wrote:

> Hi All,
> 
>   I’ve looked around the internet a bit and obviously looked at the wiki page and configuration page for rlm_cache and can’t quite understand how it works. Does anyone have any practical examples of simply storing an attribute/value pair or pairs and then check the value later in the processing?

1) Key is expanded
2) If key matches, attributes listed in update subsection are merged into the attribute lists of the current packet
3) If key doesn't match, values in update section are expanded, cache entry is created, and attributes are merged into the current request.

For example:

cache {
	key = "%{State}"

	ttl = 300

	update {
		control:OTP-Password := "%{randstr:dddddddd}"
	}
}

If state is not found in cache, OTP-Password is created and added to the cache against the state value, next time cache is accessed state matches and the value stored for OTP-Password is added back into the request.

You probably won't find much on the internet, as it was only written about a month ago.

-Arrran


More information about the Freeradius-Users mailing list