./lib/lux/cell/cell.rb in lux-fw-0.1.17 vs ./lib/lux/cell/cell.rb in lux-fw-0.1.35

- old
+ new

@@ -59,10 +59,12 @@ end end ### INSTANCE METHODS + attr_reader :cell_action + def initialize # before and after should be exected only once @executed_filters = {} @base_template = self.class.to_s.index('::') ? self.class.to_s.sub(/Cell$/,'').underscore : self.class.to_s.sub(/Cell$/,'').downcase end @@ -89,11 +91,11 @@ # maybe before filter rendered page return if Lux.page.body method_name = method_name.to_s.gsub('-', '_').gsub(/[^\w]/, '') - Lux.log " #{self.class.to_s}(:#{method_name})".blue + Lux.log " #{self.class.to_s}(:#{method_name})".light_blue Lux.page.files_in_use.push "app/cells/#{self.class.to_s.underscore}.rb" @cell_action = method_name unless respond_to? method_name @@ -134,22 +136,9 @@ opts = name name = nil end opts[:template] = name if name - - # etag and cache string are same things, one is client based, other one is server based - if opts[:cache] - opts[:cache] = Lux.cache.generate_key(opts[:cache] ) - opts[:etag] ||= opts[:cache] - end - - return if opts[:etag] && Lux.page.etag(opts[:etag]) - - if opts[:cache] - data = Lux.cache.get(opts[:cache]) - return Lux.page.body(data) if data - end render_resolve_body(opts) Lux.cache.set(opts[:cache], Lux.page.body) if opts[:cache] end