added more code for handling memcache, added spark lib