Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catalogue cache improvements #329

Merged
merged 2 commits into from Oct 22, 2015
Merged

Catalogue cache improvements #329

merged 2 commits into from Oct 22, 2015

Commits on Oct 22, 2015

  1. Prevent Puppet 3's _timestamp fact from invalidating cache

    In Puppet 3, the Puppet::Node::Facts class adds a _timestamp fact to
    the facts hash, causing constant catalogue cache invalidation between
    spec examples.  This was removed in Puppet 4 via PUP-3130.
    
    By calling #dup on the facts hash, the facts in the cache key are no
    longer modified and the catalogue cache works as expected.
    Dominic Cleal committed Oct 22, 2015
    Copy the full SHA
    c3c0e60 View commit details
    Browse the repository at this point in the history
  2. Limit the catalogue cache to 16 entries

    The catalogue cache, based on facts, code etc, previously kept all
    known catalogues in a class variable without expiration.  Large specs
    with many permutations (e.g. multiple OSes, different class or Hiera
    parameters) caused many catalogues to remain in memory and the test
    process grew to a large size.
    
    This limits the cache to keep only the last 16 entries, which should
    allow for a bit of catalog reuse within a single spec file.
    Dominic Cleal committed Oct 22, 2015
    Copy the full SHA
    5c54210 View commit details
    Browse the repository at this point in the history