load_cache_for(klassname)public
No documentation available.
# File lib/rdoc/ri/driver.rb, line 449
def load_cache_for(klassname)
path = cache_file_for klassname
cache = nil
if File.exist? path and
File.mtime(path) >= File.mtime(class_cache_file_path) and
@use_cache then
open path, 'rb' do |fp|
begin
cache = Marshal.load fp.read
rescue
#
# The cache somehow is bad. Recreate the cache.
#
$stderr.puts "Error reading the cache for #{klassname}; recreating the cache!"
cache = create_cache_for klassname, path
end
end
else
cache = create_cache_for klassname, path
end
cache
end