summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-07-21 11:47:07 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-08-19 13:52:56 -0700
commitd6e0b71f141300da5241b6a0daf6afbc3eaa29e0 (patch)
tree04bcdafa892a2ad8c6aca457af27cb9d0c1c69d8 /lib
parentd49dd9ec3ab26d122c5c2a78482136f2a5f3efda (diff)
downloadpuppet-d6e0b71f141300da5241b6a0daf6afbc3eaa29e0.tar.gz
puppet-d6e0b71f141300da5241b6a0daf6afbc3eaa29e0.tar.xz
puppet-d6e0b71f141300da5241b6a0daf6afbc3eaa29e0.zip
Remove caching from the catalog, types, and parameters
Types and parameters were registering their catalog as their expirer, so that the catalog could expire them between uses. However, because catalogs are never reused (and neither are types or parameters), there is no need to expire anything. Thus, we remove the entire cleanup/expire logic from catalog, type, and parameter. Reviewed-By: Jacob Helwig <jacob@puppetlabs.com> (cherry picked from commit e2ea023f809c2bdc53b5259047c28f8061f57e54)
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parameter.rb6
-rw-r--r--lib/puppet/resource/catalog.rb20
-rw-r--r--lib/puppet/type.rb8
3 files changed, 0 insertions, 34 deletions
diff --git a/lib/puppet/parameter.rb b/lib/puppet/parameter.rb
index 29d60fc66..c97f93b23 100644
--- a/lib/puppet/parameter.rb
+++ b/lib/puppet/parameter.rb
@@ -2,7 +2,6 @@ require 'puppet/util/methodhelper'
require 'puppet/util/log_paths'
require 'puppet/util/logging'
require 'puppet/util/docs'
-require 'puppet/util/cacher'
class Puppet::Parameter
include Puppet::Util
@@ -10,7 +9,6 @@ class Puppet::Parameter
include Puppet::Util::LogPaths
include Puppet::Util::Logging
include Puppet::Util::MethodHelper
- include Puppet::Util::Cacher
require 'puppet/parameter/value_collection'
@@ -150,10 +148,6 @@ class Puppet::Parameter
self.fail(Puppet::DevError, msg)
end
- def expirer
- resource.catalog
- end
-
def fail(*args)
type = nil
if args[0].is_a?(Class)
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb
index be6302595..ca9f25a5a 100644
--- a/lib/puppet/resource/catalog.rb
+++ b/lib/puppet/resource/catalog.rb
@@ -3,7 +3,6 @@ require 'puppet/indirector'
require 'puppet/simple_graph'
require 'puppet/transaction'
-require 'puppet/util/cacher'
require 'puppet/util/pson'
require 'puppet/util/tagging'
@@ -20,7 +19,6 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
include Puppet::Util::Tagging
extend Puppet::Util::Pson
- include Puppet::Util::Cacher::Expirer
# The host name this is a catalog for.
attr_accessor :name
@@ -126,10 +124,6 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
def apply(options = {})
@applying = true
- # Expire all of the resource data -- this ensures that all
- # data we're operating against is entirely current.
- expire
-
Puppet::Util::Storage.load if host_config?
transaction = Puppet::Transaction.new(self, options[:report])
@@ -165,7 +159,6 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
return transaction
ensure
@applying = false
- cleanup
end
# Are we in the middle of applying the catalog?
@@ -200,14 +193,6 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
resource
end
- def dependent_data_expired?(ts)
- if applying?
- return super
- else
- return true
- end
- end
-
# Turn our catalog graph into an old-style tree of TransObjects and TransBuckets.
# LAK:NOTE(20081211): This is a pre-0.25 backward compatibility method.
# It can be removed as soon as xmlrpc is killed.
@@ -567,11 +552,6 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph
private
- def cleanup
- # Expire any cached data the resources are keeping.
- expire
- end
-
# Verify that the given resource isn't defined elsewhere.
def fail_on_duplicate_type_and_title(resource)
# Short-curcuit the common case,
diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb
index 4472387d1..803b5c6a0 100644
--- a/lib/puppet/type.rb
+++ b/lib/puppet/type.rb
@@ -9,7 +9,6 @@ require 'puppet/metatype/manager'
require 'puppet/util/errors'
require 'puppet/util/log_paths'
require 'puppet/util/logging'
-require 'puppet/util/cacher'
require 'puppet/file_collection/lookup'
require 'puppet/util/tagging'
@@ -21,7 +20,6 @@ class Type
include Puppet::Util::Errors
include Puppet::Util::LogPaths
include Puppet::Util::Logging
- include Puppet::Util::Cacher
include Puppet::FileCollection::Lookup
include Puppet::Util::Tagging
@@ -469,12 +467,6 @@ class Type
Puppet::Transaction::Event.new({:resource => self, :file => file, :line => line, :tags => tags}.merge(options))
end
- # Let the catalog determine whether a given cached value is
- # still valid or has expired.
- def expirer
- catalog
- end
-
# retrieve the 'should' value for a specified property
def should(name)
name = attr_alias(name)