Skip to content

Commit

Permalink
Major performance boost while caching document ouput
Browse files Browse the repository at this point in the history
  • Loading branch information
zealot128 committed Jul 22, 2012
1 parent 108f779 commit e9f0157
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/imdb/movie.rb
Expand Up @@ -105,9 +105,9 @@ def writers

def doc
if caller[0] =~ /`([^']*)'/ and ($1 == "cast" or $1 == "writers")
@doc = Nokogiri::HTML(open("#{@link}/fullcredits"))
@doc_full ||= Nokogiri::HTML(open("#{@link}/fullcredits"))
else
@doc = Nokogiri::HTML(open("#{@link}"))
@doc ||= Nokogiri::HTML(open("#{@link}"))
end
end

Expand Down

0 comments on commit e9f0157

Please sign in to comment.