JSI Tip 9301. How can I control when cached universal group membership information is considered to be stale?


In tip 7211, we configured a Windows Server 2003 domain controllers to cache universal group membership.

In tip 8432, we configured the refresh interval and user limit for refreshing the cache.

When the cache becomes stale, after one week of non use, the information is considered invalid and is refreshed. If it cannot be refreshed, it is not used, but it is not purged from the domain controller for 180 days.

I have amended CacheFreq.bat to include the configuration of the Cached Membership Staleness and Cached Membership Site Stickiness data.

The syntax for using CacheFreq.bat on every domain controller that caches group membership is:

CacheFreq Minutes NumbUsers StaleMinutes StickyMinutes

where:

Minutes       is the number of minutes between cached membership updates. The default is 480.

NumbUsers     is the number of users to update. The default is 500.

StaleMinutes  is the number of minutes after which an unused entry is considered state, and must be refreshed.

StickyMinutes is the number of minutes after which a stale entry will be purged from the cache.
NOTE: CacheFreq.bat uses Numeric.bat.

CacheFreq.bat contains:

@echo off
setlocal
if \{%4\}==\{\} goto syntax
set min=%1
set num=%2
set stl=%3
set prg=%4
call numeric %min% ans
if "%ans%" EQU "N" goto syntax
call numeric %num% ans
if "%ans%" EQU "N" goto syntax
call numeric %stl% ans
if "%ans%" EQU "N" goto syntax
call numeric %prg% ans
if "%ans%" EQU "N" goto syntax
if "%min:~0,1%" EQU "0" goto syntax
if "%num:~0,1%" EQU "0" goto syntax
if "%stl:~0,1%" EQU "0" goto syntax
if "%prg:~0,1%" EQU "0" goto syntax
set key=HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters
@echo REG ADD %key% /V "Cached Membership Refresh Interval" /T REG_DWORD /D %min% /F
REG ADD %key% /V "Cached Membership Refresh Interval" /T REG_DWORD /D %min% /F
@echo REG ADD %key% /V "Cached Membership Refresh Limit" /T REG_DWORD /D %num% /F
REG ADD %key% /V "Cached Membership Refresh Limit" /T REG_DWORD /D %num% /F
@echo REG ADD %key% /V "Cached Membership Staleness" /T REG_DWORD /D %stl% /F
REG ADD %key% /V "Cached Membership Staleness" /T REG_DWORD /D %stl% /F
@echo REG ADD %key% /V "Cached Membership Site Stickiness" /T REG_DWORD /D %prg% /F
REG ADD %key% /V "Cached Membership Site Stickiness" /T REG_DWORD /D %prg% /F
endlocal
goto :EOF
:syntax
@echo Syntax: CacheFreq Minutes NumbUsers StaleMinutes StickyMinutes
endlocal



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish