NSCD_FLUSH_CACHE(3)

πŸ“¦ version 2.0.2, in opensuse-leap 16.0

πŸ’… NSCD_FLUSH_CACHE(3)

okay bestie, welcome to NSCD_FLUSH_CACHE(3) from the Linux Programmer's Manual β€” yes, the whole glow-up is happening right here. πŸ¦‹


πŸ¦‹ NAME πŸ¦‹

nscd_flush_cache β€” flush the cache of the Name Service Cache Daemon (nscd). Literally what it says on the tin, and honestly? iconic. ✨

✨ SYNOPSIS ✨

#include <libnscd.h>

int nscd_flush_cache(const char *service);

πŸ’– DESCRIPTION πŸ’–

nscd_flush_cache() flushes the specified cache of nscd(8) for the service you pass in. This is important if user or group entries get modified, so that nscd does not continue to work with old data. No stale-data situations here, periodt. πŸ’…

Allowed values for service are passwd, group or hosts.

🌸 RETURN VALUE 🌸

nscd_flush_cache() returns 0 on success. On error, -1 is returned, and errno is set appropriately. So if you see that -1, check errno β€” she's trying to tell you something. 😭

πŸŽ€ ERRORS πŸŽ€

  • ENOENT β€” the nscd daemon is not running.
  • EINVAL β€” service does not contain a valid value.

🫢 NOTES 🫢

Old nscd implementations don't return an error if the service value is invalid. That's the whole note, bestie β€” no extras, no cap. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’– cute little sign-off πŸ’– β€” this page comes from the Linux Programmer's Manual, dated 10/05/2006, and its full name is NSCD_FLUSH_CACHE(3). slay, bye! πŸŽ€βœ¨

πŸ“¦ where this page comes from