ant-design / ant-design-icons

⭐ Ant Design SVG Icons
https://ant.design/components/icon/
MIT License
939 stars 577 forks source link

Add ability to cache icons with local/session storage #613

Open danielbrazg opened 6 months ago

danielbrazg commented 6 months ago

Instead of doing many HTTP GET requests to fetch each icon (dynamically) every time the page is been refreshed, it will be useful to add support for caching the icon's SVG data in the local/session storage. It can be done by reading the icons cached list also from the storage if it exists: https://github.com/ant-design/ant-design-icons/blob/master/packages/icons-angular/src/component/icon.service.ts#L78C5-L78C5 Thanks