ensembl-hive  2.8.1
Bio::EnsEMBL::Utils::SeqRegionCache Class Reference

Public Member Functions

public new ()
 

Detailed Description

Synopsis

$seq_region_cache = $db->get_SeqRegionCache();
$key = "$seq_region_name:$coord_system_id";
$array = $seq_region_cache->{$key};
if ($array) {
$name = $array->[1];
$length = $array->[3];
} else {
# cache miss, get the info from the database
# ...
# cache the retrieved information
$seq_region_cache->{$key} = [
$seq_region_id, $seq_region_name,
$coord_system_id, $seq_region_length
];
}

Description

This module is simply a convenient place to put a cache of sequence
region information which is shared by several adaptors for a given
database.

Definition at line 40 of file SeqRegionCache.pm.

Member Function Documentation

◆ new()

public Bio::EnsEMBL::Utils::SeqRegionCache::new ( )

Undocumented method

Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::DBSQL::DBAdaptor
Definition: DBAdaptor.pm:40
Bio::EnsEMBL::DBSQL::DBAdaptor::get_SeqRegionCache
public Bio::EnsEMBL::Utils::SeqRegionCache get_SeqRegionCache()
Bio::EnsEMBL::DBSQL::DBAdaptor::new
public Bio::EnsEMBL::DBSQL::DBAdaptor new()