Need to improve/replace cache hack for refreshing profile image on the client.
Thinking that rather than appending an ephemeral time stamp to the URL as a query to bust the cache, instead a caching hash will be created for each profile image and generated on the server and stored on the user model. The hash will be a unique ID for the image and be used as a query in the same way as being done already with the time stamp. However the newly generated hash will be returned by the profile pic endpoint and then update the hash prop in the local model instead. This way it tidies up the front-end code and means that the hash always relates to the image and will cache-bust correctly as well.
Need to improve/replace cache hack for refreshing profile image on the client.
Thinking that rather than appending an ephemeral time stamp to the URL as a query to bust the cache, instead a caching hash will be created for each profile image and generated on the server and stored on the user model. The hash will be a unique ID for the image and be used as a query in the same way as being done already with the time stamp. However the newly generated hash will be returned by the profile pic endpoint and then update the hash prop in the local model instead. This way it tidies up the front-end code and means that the hash always relates to the image and will cache-bust correctly as well.