blade-ui-kit / blade-icons

A package to easily make use of SVG icons in your Laravel Blade views.
https://blade-ui-kit.com/blade-icons
MIT License
2.21k stars 148 forks source link

v1.7.0 introduced blade cache issues #248

Closed maciek-szn closed 3 months ago

maciek-szn commented 3 months ago

Library version

v1.7.0

Laravel version

v10.48.18

PHP version

v8.2.21

Description

Looks like #245 introduced serious cache issues. After upgrading to v1.7.0 my /storage/framework/views directory is filled with thousands of files that differ only in the value of the aria-labelledby attribute, and it's getting worse with every minute. As I understand it, this small difference is due to the fact that the aria-labelledby attribute now contains a random value, different every time. This makes it impossible to reuse compiled files - new ones are constantly being generated.

Steps to reproduce

Just install v1.7.0 and let it go. Check your /storage/framework/views directory after few minutes or hours, depending on how popular your website is.

driesvints commented 3 months ago

Most likely happening because of https://github.com/blade-ui-kit/blade-icons/pull/245/files#diff-c17f4a19b6b187c3f1e3c05b299f088d65696dc40479b19d3dc96197f44c05c5R47

@aarishgilani can we maybe change that to something like a hash of the icon name? We'll need to move fast here or I'll have to revert this PR.