neoascetic/rawgithack

A way to invalidate the cache?

matthewmcneely opened this issue · 5 comments

First off, thanks for running this...

I'd like to be able to offer 'latest'-tag functionality for accessing a gitlab-hosted JS file. I'm updating my 'latest' tag whenever I update this file. But of course, your CDN will cache that record for a year. Is there a way to send a parameter to CDN that invalidates the rawcdn entry with the new file?

I see that in commit 8f2f935 master branches have a 5 min TTL; I can use that mechanism. You might consider adding a test for the 'latest' tag to support the same construct.

Well, I can, but there are infinite number of names for the branches people consider «the latest». Usually it is a master branch.

Fair point. But I do see /latest/ in both JS and Docker versioning, so definitely not arbitrary. But I understand the reluctance: where does it end, right?

Right

Hello everyone interested in cache invalidation!

I’ve implemented the beta version of cache invalidation functionality - there is the form on the main page. Currently, you can only invalidate CDN URLs (which is obvious - we should not have problems with the regular ones). Please check it out and let me know what do you think.

Thanks!