thomaswelton / laravel-rackspace-opencloud

Laravel package for the Rackspace Open Cloud
29 stars 14 forks source link

[Question] CDN Link stored location #5

Closed JohnDotOwl closed 10 years ago

JohnDotOwl commented 10 years ago

If you are using the URL helper then it will return a CDN url for a file, if it finds a *.cdn.json file adjacent to one of it's parent directories.

How does it know when to grab Original or CDN link, where is *.cdn.json? Or isit stored in a database?

Does this opencloud contains all the function of https://github.com/rackspace/php-opencloud

Thanks for this package , i think it will be very helpful.

thomaswelton commented 10 years ago

Files are never removed from the CDN unless you manually remove them. And maybe the term sync is misleading. Maybe it should be renamed publish. Because every time you run a sync all assets are moved onto the CDN. It does not check for existing assets, all files are moved over and prepended with a new hash.

If you have any other questions let me know and close this issue when you're happy. Thanks.

JohnDotOwl commented 10 years ago

thomaswelton, What's the purpose of the hash & I plan to store my Images off my server which means it's better for me to keep a copy of path & Url. Possible? Especially when i'm using Digital ocean , their SSD is limited.

thomaswelton commented 10 years ago

The hash is there so we can set long cache expire time headers from the CDN. Without a unique URL then your users wouldn't get the latest files from the CDN if their browser had them cached

JohnDotOwl commented 10 years ago

@thomaswelton Possible to retrieve from Server if it isn't uploaded to CDN yet?