Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hostnamed: minimize caching of /etc/hostname, /etc/os-release and /et…
…c/machine-info Instead of reading these files at startup and never again, let's read them when we need them. As an optimization (in particular as some of these files contain the data for many fields at once) let's cache the results as long as the stat data (i.e. mtime) remains stable. Also, while we are at it, if we can't read any of these props, let's not fail everything, but continue without the data.
- Loading branch information
1 parent
a916a88
commit 25d7777
Showing
1 changed file
with
142 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters