Looks ok to me. One note:
you treat "" and NULL as different. I don't know how folk don't pass in icons, but if they pass them in as NULL, then perhaps you should init the cache to NULL?
It would be really good to have a test that shows when a refresh is triggered, as this code is split over several places and as such it could well get regressed unobviously.
Looks ok to me. One note:
you treat "" and NULL as different. I don't know how folk don't pass in icons, but if they pass them in as NULL, then perhaps you should init the cache to NULL?
It would be really good to have a test that shows when a refresh is triggered, as this code is split over several places and as such it could well get regressed unobviously.