Password caching module with advanced policies for PAM