A memoized wrapper for APC