dhcp and cache question

Alan DeKok aland at deployingradius.com
Thu Jul 21 17:44:49 CEST 2016


On Jul 21, 2016, at 5:40 PM, Anton <zav at tomica.ru> wrote:
> 
> Ok. I cannot understand how to cache something.

  The cache module contains examples.  You can configure it to cache specific attributes.

> For example mac2ip or sqlpool set some variables ater modules call, how
> to place them in cache with timeout ?

  Read the comments in mods-available/cache.  Look for the comments around "update".

> Timeot is configured at '/etc/raddb/mods-available/cache' in 'ttl'

  I'm aware of that,

  You need to set the various cache attributes before calling the cache module.  See the comments at the end of the cache module for documentation.

  When checking the cache:

	update {
		&control:Cache-Status-Only = yes
	}
	cache
	if (ok) {
		# cache entry was found
	}

  When updating the cache:

	cache

  It's that simple.

  Alan DeKok.




More information about the Freeradius-Users mailing list