Closed igarbera closed 7 years ago
@igarbera Just specify your own key_transform
function:
Excuse me, could you show an example for the keys like prefix:value?
@igarbera Read the documentation. The keys are escaped to the URI encoding by default. Just use an identity function by setting the key_transform
option value when doing the new()
call.
So, the problem is, I do not quite understand what parameters for key_transform
should be set in order to use keys like 'prefix: value'. Sorry for the stupid questions :(
local function identity(a) return a end
local memc = memached:new{
key_transform = { identity, identity }
}
Thank you wery much, now understand! )
Hello! I'm new in lua, and have an issue: I have data in memcached, putted by PHP with prefix with colon, such as 'appname:' . Key example is 'appname:08d1effdff9b03e8f54e55a72c703471'
So, with lua I need get data from memcached, but memc:get('appname:08d1effdff9b03e8f54e55a72c70347') not works (return nil). But if key is without colon, as memc:get('08d1effdff9b03e8f54e55a72c703471') , it works fine.
How can I use keys with prefix like 'appname:value' in lua?