Nonlocal hydrodynamics with memory