[cache] add functional tests