Generic cache handling functions for NSCD.