cache cache_password {

        driver = "rlm_cache_rbtree"
        key = "%{User-Name}"
        ttl = 3600
        add_stats = no
        update {
                &control:Cleartext-Password := &control:Cleartext-Password

                # Add our own to show when the cache was last updated
                &reply:Reply-Message += "Cache last updated at %t"

                &reply:Class := "%{randstr:ssssssssssssssssssssssssssssssss}"
        }
}

cache userprincipalname {

        driver = "rlm_cache_rbtree"
        key = "%{User-Name}"
        ttl = 3600
        add_stats = no
        update {
                &control:AD-Samaccountname := &control:AD-Samaccountname
                &request:PacketFence-UserDN := &control:LDAP-UserDN
                # Add our own to show when the cache was last updated
                &reply:Reply-Message += "Cache last updated at %t"

                &reply:Class := "%{randstr:ssssssssssssssssssssssssssssssss}"
        }
}

cache PacketFence-NTCacheHash {

        driver = "rlm_cache_rbtree"
        key = "%{User-Name}"
        ttl = 10
        add_stats = no
        update {
                &control:PacketFence-NTCacheHash := &control:PacketFence-NTCacheHash
        }
}
