Adds memoization to lightbox calls.