method
load_cache_for
Ruby latest stable (v2_5_5)
-
0 notes -
Class: Driver
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
load_cache_for(klassname)
public
Hide source
# 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