update code for compatibility with Heroky memcachier