Split out functions for saving to APC or non persistent storage