public function render($dest = '', $filename = '')
{
$cacheKey = md5(serialize($this->plp) . $this->idPlpCorreios . get_class($this));
if ($pdfContent = Bootstrap::getConfig()->getCacheInstance()->getItem($cacheKey)) {
header('Content-Type: application/pdf');
header('Content-Disposition: inline; filename="doc.pdf"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
echo $pdfContent;
} else {
if ($dest == 'S') {
return $this->_render($dest, $filename);
} else {
$this->_render($dest, $filename);
Bootstrap::getConfig()->getCacheInstance()->setItem($cacheKey, $this->pdf->buffer);
}
}
}