Cache system for macros