Add :last test to query_cache