require_relative ‘../../app/cms/scrivito/cache_garbage_collector’

namespace :scrivito do

namespace :cache do
  desc 'Cap number of cache file inodes at ' \
    "#{Scrivito::CacheGarbageCollector::DEFAULT_MAX_FILE_INODES} " \
    '(Use MAX_FILE_INODES=500 to specify the maximum). ' \
    'See Scrivito::CacheGarbageCollector for details.'
  task gc: :environment do
    Scrivito::CacheGarbageCollector.new(ENV['MAX_FILE_INODES']).run_gc
  end
end

end