vendor/bundle/ruby/1.8/gems/Ruby-MemCache-0.0.1/lib/memcache.rb
### Create a key for the cache from any object. Strings are used as-is,
### Symbols are stringified, and other values use their #hash method.
Create a key for the cache from any object. Strings are used as-is,
Symbols are stringified, and other values use their #hash method.
Create a key for the cache from any object . Strings are used as - is Symbols are stringified and other values use their #hash method .
def make_cache_key( key )
		ck = @namespace ? "#@namespace:" : ""
		case key
		when String, Symbol
			ck += key.to_s
		else
			ck += "%s" % key.hash
		end
		ck = URI::escape( ck ) unless !@urlencode
		self.debug_msg( "Cache key for %p: %p", key, ck )
		return ck
	end
def make_cache_key ( key ) ck = @namespace ? "#@namespace:" : "" case key when String , Symbol ck += key . to_s else ck += "%s" % key . hash end ck = URI :: escape ( ck ) unless ! @urlencode self . debug_msg ( "Cache key for %p: %p" , key , ck ) return ck end
Create a key for the cache from any object.
Create a key for the cache from any object .
key