puppetlabs/hiera — pull request #39 by glarizza (2012-04-11 18:06:51+00:00)
Title: Commit caching on YAML Backend

Previously, the YAML backend would read from disk every time it needed
to check a hierarchy. This commit introduces memoization through an
instance variable so a file is read only if the instance variable is
empty, and only if the file has not changed. To check if the file has
changed (or if the cache is stale), we stat the file and compare the
mtime, size, and inode. Tests have been added for this new
functionality.

Fix Bugs and Commit Tests