Cache codec in QR code encoder