datagovuk / dgu-vagrant-puppet

[unmaintained] Container environment for booting fresh DGU virtual machines. Create VMs with Vagrant, configure them with Puppet.
37 stars 29 forks source link

Link to cached file shows wrong URL #77

Closed tbalaz closed 9 years ago

tbalaz commented 9 years ago

Hi,

I have changed ckan.cache_url_root in ckan.ini to https://testdata.gov.hr/data/resource_cache/

after enabling caching, link to cached file shows URL

http://**localhost:5000**/data/resource_cache/a4/a4d982e0-ef37-4523-be91-a704668e33f1/file.xls

How can i change this?

Please advice.

tbalaz commented 9 years ago

Here is how it looks.

issue

tbalaz commented 9 years ago

Is there a way to clear all cached data?

davidread commented 9 years ago

This is the command:

sudo -u www-data /home/co/ckan/bin/paster --plugin=ckanext-archiver archiver clean-cached-resources --config=/var/ckan/ckan.ini

which is basically means paster archiver clean-cached-resources.

Or alternatively, I think this should be ok:

psql ckan -c 'UPDATE archival SET cache_url=null;'
davidread commented 9 years ago

Where it says "Cached by data.gov.uk" it would be helpful to change the template to use a variable, say ckan.site_title. Pull request for this is welcome!

tbalaz commented 9 years ago

I have cleared all cached files with

sudo -u www-data /home/co/ckan/bin/paster --plugin=ckanext-archiver archiver clean-cached-resources --config=/var/ckan/ckan.ini

as you suggessted.

Error with link to cached file is still here

http://localhost:5000/data/resource_cache/a4/a4d982e0-ef37-4523-be91-a704668e33f1/file.xls

I have changed ckan.cache_url_root in ckan.ini to show data.gov.hr.

Do i need to change something else?

Am i missing something?