jsdelivr / libgrabber

DEPRECATED Keeps projects hosted in jsDelivr updated
20 stars 21 forks source link

Version aliasing doesn't point to the latest version #32

Closed seafoox closed 10 years ago

seafoox commented 10 years ago

Hi there, We've recently pushed the latest version of our javascript client: v2.6.6 and we'd like to make it available to our users through jsdelivr to always provide them our latest version, so they won't have to worry about minor updates. We just discovered that aliases point to different versions, and not to the last one.

Latest version: 2.6.6 (added 13 days ago) http://cdn.jsdelivr.net/algoliasearch/latest/algoliasearch.min.js -> 2.6.2 http://cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js -> 2.6.5

Sounds like a caching issue. Could you please have a look into it. Otherwise, can you tell me how often does the libgrabber bot crawle github repos?

Thanks,

jimaek commented 10 years ago

We have the latest version http://www.jsdelivr.com/#!algoliasearch so its not a libgrabber problem.

For version aliasing to offer performance bonus we need to cache it for a certain amount of time, thats why its not instant after update. The cache should expire soon automatically.

And once we setup a purging API we can work more on that and make our bot to automatically purge the cache when a new version is added.

But we always were and will be recommending to use full versions in your URLs. Its the safest and fastest solution.

seafoox commented 10 years ago

Thanks for details. Can you tell me more about your caching policy, please: how long are resources behind aliases cached? When are you planing to have this purging API that could be used every time a new version is pushed?

Thanks,

jimaek commented 10 years ago

In the next month I will try to have the purging API ready. Of course its going to be accessible only by our bots.

Right now the CDN caches static files for 12 months. /g/ is cached for 6 months 2 from 2.0.3 is cached for 1 month latest is cached for 2 weeks

seafoox commented 10 years ago

Alright thanks for detail. Looking forward to see this purging API live :-)

Cheers, Alex

jimaek commented 10 years ago

np, let me know if you have any questions or any other feedback

tomByrer commented 10 years ago

I assume 2.0 from 2.0.3 is cached for 1 month also?

jimaek commented 10 years ago

yes, its the same thing