Change size_t to long for redis compatibility