Skip to content

Commit

Permalink
Don't cache data: URIs
Browse files Browse the repository at this point in the history
They bloat the cache by storing themselves twice (key + decoded data).
  • Loading branch information
zapek committed Dec 17, 2024
1 parent 582eb62 commit 96b777f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Image getImage(String url)
@Override
public void putImage(String url, Image image)
{
if (!isImageCacheable(image))
if (url.startsWith("data:") || !isImageCacheable(image))
{
return;
}
Expand Down

0 comments on commit 96b777f

Please sign in to comment.