ThreeSixtyGiving / Insights

Combining and visualising 360Giving and charity data to answer questions about grantmaking
https://insights.threesixtygiving.org/
GNU General Public License v3.0
3 stars 2 forks source link

Remote file changes not reflected due to stale cache #170

Open michaelwood opened 3 years ago

michaelwood commented 3 years ago

If a file has been downloaded and cached but changes are made to it those changes aren't reflected in Insights due to the cache being stale.

The work around is to remove the file from the cache, e.g. flask data remove a003W000004OfNSQA0 possible better solutions would be to install a scheduled job to clear all the cache and rebuilt it on a daily basis or to update the cache mechanism to check for remote changes.

@drkane Is this something that was handled on the old Insights server ? (ODSC planio 31369)

drkane commented 3 years ago

Sorry - I missed this. The issue was previously dealt with in the manual way you mention above.

There is meant to be some logic in the code that checks for new versions before displaying the current one but I've never got it to work properly.

Clearing the cache completely every night might work, but the process takes quite a long time for all the files, and isn't as error-protected as the similar processes in datastore & grantnav.

michaelwood commented 3 years ago

Insights not expiring cached files