Make automorphy factor functions cached