added caching for QR code