add memcache sample code in model.