-
Notifications
You must be signed in to change notification settings - Fork 16
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
Clear image list cache #189
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you branched from the project deletion, that is why those changes currently also appear here in the diff (which is between the new branch and master
). I ignored that for now.
@@ -4,6 +4,7 @@ defmodule FieldHub.FileStore do | |||
@valid_file_variants Application.compile_env(:field_hub, :valid_file_variants) | |||
@index_cache_name Application.compile_env(:field_hub, :file_index_cache_name) | |||
@index_cache_expiration_ms 1000 * 60 * 60 * 24 | |||
# @index_cache_expiration_ms 3000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did you try here? This line should probably be deleted at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I wanted to see what happened without wait one day.
new_cache = "Delete or update cache in this handle_event" | ||
cache_index = FieldHub.FileStore.file_index(project) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the ticket you do not need to create a new cache, that is already handled by the FileStore
internally.
The only thing that has to be triggered from the interface is the FileStore's function to clear the existing cache. If you want to have a look how the file index looks like, you could for example use the Desktop client to push new images into the repository.
No description provided.