app/controllers/application_controller.rb
# expire a list of taxa_ids specifed as an array, usually including its ancestors (optionally not)
# NOTE - this is VERY slow because each taxon is expired individually.  But this is a limitation of memcached.  Unless we
# want to keep an index of all of the memcached keys related to a given taxon, which itself would be confusing, this is not
# really possible.
expire a list of taxa_ids specifed as an array, usually including its ancestors (optionally not)
NOTE - this is VERY slow because each taxon is expired individually.  But this is a limitation of memcached.  Unless we
want to keep an index of all of the memcached keys related to a given taxon, which itself would be confusing, this is not
really possible.
expire a list of taxa_ids specifed as an array usually including its ancestors ( optionally not ) NOTE - this is VERY slow because each taxon is expired individually . But this is a limitation of memcached . Unless we want to keep an index of all of the memcached keys related to a given taxon which itself would be confusing this is not really possible .
def expire_taxa(taxa_ids)
    return if taxa_ids.nil?
    raise "Must be called with an array" unless taxa_ids.class == Array
    taxa_ids_to_expire = find_ancestor_ids(taxa_ids)
    return if taxa_ids_to_expire.nil? 
    if taxa_ids_to_expire.length > $MAX_TAXA_TO_EXPIRE_BEFORE_EXPIRING_ALL
      Rails.cache.clear
    else
      expire_taxa_ids_with_error_handling(taxa_ids_to_expire)
    end
  end
def expire_taxa ( taxa_ids ) return if taxa_ids . nil? raise "Must be called with an array" unless taxa_ids . class == Array taxa_ids_to_expire = find_ancestor_ids ( taxa_ids ) return if taxa_ids_to_expire . nil? if taxa_ids_to_expire . length > $MAX_TAXA_TO_EXPIRE_BEFORE_EXPIRING_ALL Rails . cache . clear else expire_taxa_ids_with_error_handling ( taxa_ids_to_expire ) end end
expire a list of taxa_ids specifed as an array, usually including its ancestors (optionally not)
NOTE - this is VERY slow because each taxon is expired individually.
expire a list of taxa_ids specifed as an array usually including its ancestors ( optionally not ) NOTE - this is VERY slow because each taxon is expired individually .
# Yes, again.  Sorry.
taxa_ids
<not_specific>