module Bio::GFFbrowser::Digest::LruCacheHelpers::LruRec

Public Instance Methods

fetch(fh,fpos,parser) click to toggle source

Fetch a record using fh and file seek position, utilising the LRU cache

# File lib/bio/db/gff/digest/gfflrucache.rb, line 42
def fetch(fh,fpos,parser)
  return nil if fh==nil or fpos==nil
  rec = @lru[fpos]
  if rec==nil
    rec = SeekRec::fetch(fh,fpos,parser)
    @lru[fpos] = rec
  end
  rec
end