Subject: | Handling NOT_FOUND errors |
Date: | Wed, 16 Jul 2014 09:23:25 +0000 |
To: | "'bug-Cache-Memcached [...] rt.cpan.org'" <bug-Cache-Memcached [...] rt.cpan.org> |
From: | "Vignesh, Saravanai" <svignesh [...] corp.untd.com> |
'incr', 'decr' interfaces return undef for below use cases.
(1) Failure in communicating with memcached
(2) key is not found.
There is no way to differentiate the above use cases with 'undef' return value.
Can we provide an API for getting the actual data returned by memcached ? In case of 'key' not found, new API should return "NOT FOUND" and applications can use this to differentiate.
Also, does it make sense to provide 'safe_incr', 'safe_decr' APIs which will set the key with appr value for key not found case ?
Thanks,
Vignesh.
Message body is not shown because it is too large.