Cardinal invariants on function spaces