Do proper return code to script from cachedb_* functions ( treat 0 as success )
(cherry picked from commit 5635d716e0bf1ce8a23688698fe6497fadfe7f23)