It seems this function is called quite often. Should this be cached?