-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Feature Request] Option to disable cache (localStorage) #88
Labels
enhancement
New feature or request
Comments
Do you want to disable it in development only @renegadevi ? Because it production this can lead to serious performance drawbacks. |
Yes this is mainly during development or testing. |
Have you try adding a plugin to do it @renegadevi // plugins/iconify.ts
import { disableCache } from 'iconify-icon';
export default defineNuxtPlugin(() => {
if (process.dev) {
disableCache('all')
}
}) |
Sadly not. I tried it with the nuxt-icons and just standalone iconify-icons, both still cached. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Iconify by default has cache enabled, this is good for performance but because it uses localStorage, it's something that may not always be initially wanted. As for Iconify, it creates more entries the more icons you use.
Iconify has a built-in function to disable this, but I cannot find any way to disable it with this module, such as in module options in the nuxtIcon-config which would had been very useful.
https://iconify.design/docs/iconify-icon/disable-cache.html
The text was updated successfully, but these errors were encountered: