20 lines
393 B
Ruby
Raw Normal View History

2016-09-24 13:52:43 +02:00
module Hbc
module Cache
module_function
2016-08-18 22:11:42 +03:00
2016-09-24 13:52:43 +02:00
def ensure_cache_exists
return if Hbc.cache.exist?
2016-09-20 15:11:33 +02:00
2016-09-24 13:52:43 +02:00
odebug "Creating Cache at #{Hbc.cache}"
Hbc.cache.mkpath
end
2016-08-18 22:11:42 +03:00
def delete_legacy_cache
2016-09-24 13:52:43 +02:00
return unless Hbc.legacy_cache.exist?
2016-08-18 22:11:42 +03:00
ohai "Deleting legacy cache at #{Hbc.legacy_cache}..."
2016-09-24 13:52:43 +02:00
FileUtils.remove_entry_secure(Hbc.legacy_cache)
2016-08-18 22:11:42 +03:00
end
end
end