Module: ActiveFedora::LdpCache::ClassMethods

Included in:
Base
Defined in:
lib/active_fedora/ldp_cache.rb

Instance Method Summary collapse

Instance Method Details

#cache(&block) ⇒ Object

Enable the query cache within the block if Active Fedora is configured. If it’s not, it will execute the given block.



7
8
9
10
# File 'lib/active_fedora/ldp_cache.rb', line 7

def cache(&block)
  connection = ActiveFedora.fedora.connection
  connection.cache(&block)
end

#uncached(&block) ⇒ Object

Disable the query cache within the block if Active Fedora is configured. If it’s not, it will execute the given block.



14
15
16
# File 'lib/active_fedora/ldp_cache.rb', line 14

def uncached(&block)
  ActiveFedora.fedora.connection.uncached(&block)
end