Method: StaticCache.cache_files

Defined in:
app/models/static_cache.rb

.cache_files(options = {}) ⇒ Object



33
34
35
36
37
38
39
# File 'app/models/static_cache.rb', line 33

def cache_files(options = {})
  Dir.glob(File.join(CACHE_PATH, "**/*"), File::FNM_DOTMATCH).map do |file|
    next if file =~ /\.gz$/ unless options[:with_gz]
    next if File.directory? file
    file.sub "#{CACHE_PATH}/", ""
  end.compact.sort.uniq
end