lib/eol/sparql/client.rb
# NOTE: we do NOT clear the cache here, if it's empty, just in case it
# really IS empty FOR THIS CLADE... we don't want all caches cleared, in
# that case! We'll rely on #all_measurement_type_known_uris to clear the
# caches if things are broken--it should be called often enough.
we do NOT clear the cache here, if it's empty, just in case it
really IS empty FOR THIS CLADE... we don't want all caches cleared, in
that case. We'll rely on #all_measurement_type_known_uris to clear the
caches if things are broken--it should be called often enough.
we do NOT clear the cache here if it ' s empty just in case it really IS empty FOR THIS CLADE ... we don ' t want all caches cleared in that case . We ' ll rely on #all_measurement_type_known_uris to clear the caches if things are broken -- it should be called often enough .
def all_measurement_type_known_uris_for_clade(taxon_concept)
        remember_cached_taxon(taxon_concept.id)
        self.class.cache_fetch_with_local_timeout(
          self.class.clade_cache_key(taxon_concept.id),
          :expires_in => 2.weeks) do
          all_uris = counts_of_all_measurement_type_uris_in_clade(taxon_concept).map { |k,v| k }
          all_known_uris = KnownUri.by_uris(all_uris)
          all_uris.map { |uri| all_known_uris.detect { |kn| kn.uri == uri } }
        end
      end
def all_measurement_type_known_uris_for_clade ( taxon_concept ) remember_cached_taxon ( taxon_concept . id ) self . class . cache_fetch_with_local_timeout ( self . class . clade_cache_key ( taxon_concept . id ) , :expires_in => 2 . weeks ) do all_uris = counts_of_all_measurement_type_uris_in_clade ( taxon_concept ) . map { | k , v | k } all_known_uris = KnownUri . by_uris ( all_uris ) all_uris . map { | uri | all_known_uris . detect { | kn | kn . uri == uri } } end end
NOTE: we do NOT clear the cache here, if it's empty, just in case it
really IS empty FOR THIS CLADE... we don't want all caches cleared, in
that case!
NOTE : we do NOT clear the cache here if it ' s empty just in case it really IS empty FOR THIS CLADE ... we don ' t want all caches cleared in that case!
taxon_concept
<not_specific>