Re: [RadiusNT] Caching headaches

Peter Deacon ( peterd@iea-software.com )
Thu, 10 Feb 2000 18:09:45 -0800 (Pacific Standard Time)

On Thu, 10 Feb 2000, Greg White wrote:

> Hello,
> We are currently running Radius 3.0.147 on an NT4 SP4 server, and running
> into some problems with caching. The problems are as follows:

> 1. It doesn't seem to be reliably picking up new users or modified
> accounts.

> I have gone so far as to modify the RadGetUserCache stored proc so that it
> grabs the modified accounts for the entire previous day. The thought here
> was that perhaps during times of heavy load, something was keeping Radius
> from calling the procedure. We still have occasional times when it doesn't
> get the new or modified users.

It fetches updated users based on the accounts LastModifyDate. If this
one isn't getting updated in your software when an account changes
Radius won't re-cache unless the authentication fails or several days
go by :(

If your running a RadiusNT database (NOT Emerald!) You can run the
queries below to install a trigger to have the database automatically keep
LastModifyDate up to date.

CREATE TRIGGER MA_Update ON MasterAccounts
FOR UPDATE
AS
UPDATE ma SET LastModifyDate = getdate()
FROM MasterAccounts ma, Inserted i
WHERE ma.CustomerID = i.CustomerID
GO

CREATE TRIGGER SA_Update ON SubAccounts
FOR UPDATE
AS
Update sa
Set LastModifyDate = GetDate()