In my application I have a controller/view that displays the contents
of an audit log file
def audit_log
render :layout => ‘table’, :file => AUDIT_LOG
end
The audit log is updated frequently but the render call does not re-
read the file so it gets stale. Is there a way to tell render to
check the file timestamp and reload as needed?
In my application I have a controller/view that displays the contents
of an audit log file
def audit_log
render :layout => ‘table’, :file => AUDIT_LOG
end
The audit log is updated frequently but the render call does not re-
read the file so it gets stale. Is there a way to tell render to
check the file timestamp and reload as needed?
Just posting some notes in case someone else runs into this.
It looks like caching happens when a layout is specified
(for :text, :file and :inline). I wanted my layout so I’m off to try
something new. :-\