Remove old caching code from report model
This commit is contained in:
parent
35ec6c6806
commit
38415f28da
|
@ -1,15 +1,10 @@
|
||||||
class Report
|
class Report
|
||||||
|
|
||||||
attr_accessor :type, :data, :cache
|
attr_accessor :type, :data
|
||||||
|
|
||||||
def self.cache_expiry
|
|
||||||
3600 # In seconds
|
|
||||||
end
|
|
||||||
|
|
||||||
def initialize(type)
|
def initialize(type)
|
||||||
@type = type
|
@type = type
|
||||||
@data = nil
|
@data = nil
|
||||||
@cache = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def as_json
|
def as_json
|
||||||
|
@ -28,7 +23,6 @@ class Report
|
||||||
|
|
||||||
# Load the report
|
# Load the report
|
||||||
report = Report.new(type)
|
report = Report.new(type)
|
||||||
report.cache = false if opts[:cache] == false
|
|
||||||
send(report_method, report)
|
send(report_method, report)
|
||||||
report
|
report
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue