module ThreeD::ModelFragments::InstanceMethods

Public Instance Methods

cache(data, scope_data=nil, &block) click to toggle source
# File lib/three_d/model_fragments.rb, line 51
def cache(data, scope_data=nil, &block)
  # TODO: Implement Cache function directly from model instance
end
cache_name(data, scope_data=nil) click to toggle source
# File lib/three_d/model_fragments.rb, line 56
def cache_name(data, scope_data=nil)  
  data = data.to_s
  x = "#{self.class.name.parameterize}_#{self.id}_cache_#{data}"
  x << "_#{scope_data.to_s}" if scope_data
  return x
end
clear_view_cache(data="") click to toggle source
# File lib/three_d/model_fragments.rb, line 63
def clear_view_cache(data="")
  %x(rm #{self.full_cache_path(data)})
end
full_cache_path(data="") click to toggle source
# File lib/three_d/model_fragments.rb, line 67
def full_cache_path(data="")
  "#{self.class.caching_path}/views/#{self.class.name.parameterize}_#{self.id}_#{data}*"
end