diff --git a/app/views/layouts/application-ng.rhtml b/app/views/layouts/application-ng.rhtml index a562de5..010ae7b 100644 --- a/app/views/layouts/application-ng.rhtml +++ b/app/views/layouts/application-ng.rhtml @@ -15,7 +15,7 @@ <% plugins_stylesheets = @plugins.select(&:stylesheet?).map { |plugin| plugin.class.public_path('style.css') } %> - <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache-plugins-style-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %> + <%= stylesheet_link_tag(plugins_stylesheets, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_stylesheets.to_s)) unless plugins_stylesheets.empty? %> <%= stylesheet_link_tag theme_stylesheet_path %> <%# Add custom tags/styles/etc via content_for %> @@ -24,7 +24,7 @@ <% plugins_javascripts = @plugins.map { |plugin| plugin.js_files.map { |js| plugin.class.public_path(js) } }.flatten %> - <%= javascript_include_tag(plugins_javascripts, :cache => 'cache-plugins-js-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %> + <%= javascript_include_tag(plugins_javascripts, :cache => 'cache/plugins-' + Digest::MD5.hexdigest(plugins_javascripts.to_s)) unless plugins_javascripts.empty? %> <%= @plugins.dispatch(:head_ending).collect do |content| content.respond_to?(:call) ? content.call : content diff --git a/debian/noosfero.links b/debian/noosfero.links index 39a3420..0f21fa7 100644 --- a/debian/noosfero.links +++ b/debian/noosfero.links @@ -13,6 +13,8 @@ var/lib/noosfero-data/cache/cache-chat.js usr/share/noosfero/public/ja var/lib/noosfero-data/cache/cache-slideshow.js usr/share/noosfero/public/javascripts/cache-slideshow.js var/lib/noosfero-data/cache/cache.css usr/share/noosfero/public/stylesheets/cache.css var/lib/noosfero-data/cache/cache-media-listing.css usr/share/noosfero/public/stylesheets/cache-media-listing.css +var/lib/noosfero-data/cache usr/share/noosfero/public/javascripts/cache +var/lib/noosfero-data/cache usr/share/noosfero/public/stylesheets/cache var/lib/noosfero-data/public/articles usr/share/noosfero/public/articles var/lib/noosfero-data/public/image_uploads usr/share/noosfero/public/image_uploads var/lib/noosfero-data/public/thumbnails usr/share/noosfero/public/thumbnails diff --git a/script/production b/script/production index cf9bc1f..e6cfb10 100755 --- a/script/production +++ b/script/production @@ -17,12 +17,11 @@ fi clear_cache() { if test -w ./public; then echo "Cleaning cache files" - rm -f ./public/javascripts/cache-*.js - rm -f ./public/stylesheets/cache.css + rm -rf ./public/javascripts/cache* + rm -rf ./public/stylesheets/cache* elif [ ! -z "$NOOSFERO_DATA_DIR" ] && [ -w "$NOOSFERO_DATA_DIR" ]; then echo "Cleaning cache files" - rm -f $NOOSFERO_DATA_DIR/cache/cache-*.js - rm -f $NOOSFERO_DATA_DIR/cache/cache.css + rm -rf "$NOOSFERO_DATA_DIR"/cache/* fi } -- libgit2 0.21.2