Implement an LRU pixbuf cache for LiteHTML viewer
authorJonathan Boeing <jonathan.n.boeing@gmail.com>
Sun, 25 Jul 2021 02:08:55 +0000 (19:08 -0700)
committerJonathan Boeing <jonathan.n.boeing@gmail.com>
Mon, 26 Jul 2021 22:42:52 +0000 (15:42 -0700)
commit2018afa55f1121ba703251963f16fd201afa1bcb
treed0c68b07be5180b4120a4dcd2b965ab3f094530f
parent6472e759fd35f87a1cbf4f0fde9bd527c6bff164
Implement an LRU pixbuf cache for LiteHTML viewer

Replace the list-based pixbuf cache with a map-based system.  Messages with
duplicate image urls were causing multiple downloads and cache entries for
the same url.  The map-based cache enforces uniqueness based on the url.

Also add a timestamp to the cache entries so that they can be pruned based on
the last requested time, rather than the order they were first requested.
src/plugins/litehtml_viewer/container_linux.cpp
src/plugins/litehtml_viewer/container_linux.h
src/plugins/litehtml_viewer/container_linux_images.cpp