FelixOngati / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

datauri images are not cleared from cache #555

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
datauri images are cached but not tracked, so they are not deleted after the 
document has been rendered.

This patch against current SVN solves the issue:

Index: include/image_cache.cls.php
===================================================================
--- include/image_cache.cls.php (revisión: 506)
+++ include/image_cache.cls.php (copia de trabajo)
@@ -123,7 +123,7 @@
         if ( $width && $height && in_array($type, array(IMAGETYPE_GIF, IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_BMP)) ) {
           //Don't put replacement image into cache - otherwise it will be deleted on cache cleanup.
           //Only execute on successfull caching of remote image.
-          if ( DOMPDF_ENABLE_REMOTE && $remote ) {
+          if ( DOMPDF_ENABLE_REMOTE && $remote || $datauri ) {
             self::$_cache[$full_url] = $resolved_url;
           }
         }

Original issue reported on code.google.com by luisg...@gmail.com on 13 Nov 2012 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00