Skip to content

[Icons]: Suggestion: Disable the cache for local icons in DEV environment #2797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ThomasLandauer opened this issue May 29, 2025 · 6 comments

Comments

@ThomasLandauer
Copy link
Contributor

Would it be possible to disable the cache completely in DEV environment, so that it's not necessary to manually clear the cache after making changes to an SVG file?

@smnandre
Copy link
Member

Entirely no, because we won't download icons every request.. but for local files some improvements would be possible I suppose..

I never had any trouble with local files, but I have my own habits, and very probably am "blind" to many many situations that deserve as much attention.

Could you describe your scenario so we can reproduce / see how to improve DX ? (where is the icon, how you render it, what happens in term of caching?)

@kbond
Copy link
Member

kbond commented May 30, 2025

Interesting, can we hook into what Symfony does for files in dev?

@ThomasLandauer ThomasLandauer changed the title [Icons]: Suggestion: Disable the cache in DEV environment [Icons]: Suggestion: Disable the cache for local icons in DEV environment Jun 1, 2025
@ThomasLandauer
Copy link
Contributor Author

Yes, I meant only for local icons - I now edited the title.

@smnandre
Copy link
Member

smnandre commented Jun 1, 2025

I just checked the code. It may require quite a bit of work, because when we cache the icon, we don’t have any information about where it originally came from (file path or API).

@Kocal
Copy link
Member

Kocal commented Jun 1, 2025

@smnandre
Copy link
Member

smnandre commented Jun 2, 2025

It does, that's what @kbond implied i suppose (it's --partially-- how AssetMapper works for instance)

But that's where I say we'd need to change more than one class, as the CacheRegistry for now has no information about the file :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants