Class: Apollo::Cache::Factory

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/apollo_crawler/cache/factory.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFactory

Returns a new instance of Factory.



35
36
37
# File 'lib/apollo_crawler/cache/factory.rb', line 35

def initialize
	@cache = nil
end

Class Method Details

.constructObject



39
40
41
# File 'lib/apollo_crawler/cache/factory.rb', line 39

def self.construct()
	self.singleton.construct()
end

Instance Method Details

#constructObject



43
44
45
46
47
48
49
50
51
52
# File 'lib/apollo_crawler/cache/factory.rb', line 43

def construct()
	if(@cache.nil? == false)
		return @cache
	end

	res = RbConfig::CACHE_CLASS.new(RbConfig::CACHE_CLASS_OPTIONS)

	@cache = res
	return res
end