CAUTION: be careful to prevent users to edit the cache file. It's
YOUR resposibility to protect the cache files from crackers. Don't
use TemplateFileWithCache::set_cache_dir if you don't understand
this.
# File lib/amrita/template.rb, line 368def TemplateFileWithCache::set_cache_dir(path)
if path
@@cache_manager = SourceCache.new(path)
else
@@cache_manager = nilendend
[](path)
# File lib/amrita/template.rb, line 379def TemplateFileWithCache::[](path)
TemplateFileWithCache.new(path)
end
new(path)
# File lib/amrita/template.rb, line 383def initialize(path)
super
@cache_manager = @@cache_manager if @@cache_manager
end
Public Instance methods
cache_path()
# File lib/amrita/template.rb, line 388def cache_path
@path
end
source_mtime()
# File lib/amrita/template.rb, line 392def source_mtime
File::stat(@path).mtime
end