Method: RDF::Node.cache
- Defined in:
- lib/rdf/model/node.rb
.cache ⇒ RDF::Util::Cache
Note:
caching interned nodes means that two different invocations using the same symbol will result in the same node, which may not be appropriate depending on the graph from which it is used. RDF requires that bnodes with the same label are, in fact, different bnodes, unless they are used within the same document.
Cache size may be set through RDF.config using ‘node_cache_size`.
21 22 23 24 |
# File 'lib/rdf/model/node.rb', line 21 def self.cache require 'rdf/util/cache' unless defined?(::RDF::Util::Cache) @cache ||= RDF::Util::Cache.new(RDF.config.node_cache_size) end |