Skip to content
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

Expire Icons cache #26

Open
xescugc opened this issue Jul 24, 2020 · 0 comments
Open

Expire Icons cache #26

xescugc opened this issue Jul 24, 2020 · 0 comments

Comments

@xescugc
Copy link
Member

xescugc commented Jul 24, 2020

With #25 we have added Icons to InfraMap, this icons are compiled into the binary but for DOT Printer those icons have to be on the FileSystem.

What we are doing now is store them into $XDG_CACHE_HOME/inframa/assets/{provider} when we need to diplay them (not all of them, just the ones that are needed for the Graph). But if for any reason we change the Icons to display new ones with the same Name they'll never be updated.

We should find a way to know that the Icon that it's in $XDG_CACHE_HOME is on the last version. Some solutions could be:

  • Compare content: If it's not the same replace
  • Compare hashes: If it's not the same replace
  • Have a global version of the Icons: As it's easy to write them to the Cache we could have a general version for the Icons and write it to the Cache (like a Manifest). And if the icons change we generate a new Manifest and if they are different we drop all of them (we do not expect to change Icons that often)
  • Any others?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant