def initialize(url_cache_dir,native_file_cache_dir)
@url_cache_dir=url_cache_dir
@native_file_cache_dir=native_file_cache_dir
@url_cache_list="#{url_cache_dir}/cache.urls"
Dir.mkdir(url_cache_dir) unless File.exists?(url_cache_dir)
raise "cache directory #{url_cache_dir} invalid" unless File.directory?(url_cache_dir)
Dir.mkdir(native_file_cache_dir) unless File.exists?(native_file_cache_dir)
raise "cache directory #{native_file_cache_dir} invalid" unless File.directory?(native_file_cache_dir)
end