home-assistant / Iconic

:art: Auto-generated icon font library for iOS, watchOS and tvOS
Apache License 2.0
1.58k stars 86 forks source link

Image cache support #12

Closed dzenbot closed 2 years ago

dzenbot commented 8 years ago

I was thinking of adding a cache layer to keep a reference of generated image instances. This could be helpful specially when the same icon with color and scale are requested multiple times. Just putting this out there to see what users think. This is low priority for now.

At first, I was thinking of a NSCache wrapper but then discovered the power of LRU caches and seems more appropriate. I would hate having to add yet another dependency to this library, so maybe creating our own LRU cache implementation makes sense? Wouldn't know where to start tho, so any help is greatly appreciated!