lib/query_memcached.rb
# Transforms a sql query into a valid key for Memcache
Transforms a sql query into a valid key for Memcache
Transforms a sql query into a valid key for Memcache
def query_key(sql)
        table_names = ActiveRecord::Base.extract_table_names(sql)
        version_number = get_cache_version 
        table_names.each { |table_name| version_number += get_cache_version(table_name) }
        "#{version_number}_#{DIGEST.hexdigest(sql)}"
      end
def query_key ( sql ) table_names = ActiveRecord :: Base . extract_table_names ( sql ) version_number = get_cache_version table_names . each { | table_name | version_number += get_cache_version ( table_name ) } "#{version_number}_#{DIGEST.hexdigest(sql)}" end
Transforms a sql query into a valid key for Memcache
Transforms a sql query into a valid key for Memcache
# version_number is the sum of the global version number and all  # the version numbers of each table # global version 
sql
<not_specific>