Permalink
Browse files

better sqlite index support and cache expiration fixes

  • Loading branch information...
davydotcom committed Dec 11, 2012
1 parent fd20d24 commit cbca342634d428ef170306be790da5c9df301ef6
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- spud_photos (0.9.0.2)
+ spud_photos (0.9.1)
paperclip
rails (~> 3.2.2)
spud_core (>= 0.9.0, < 1.0.0)
@@ -129,7 +129,7 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- spud_core (0.9.5)
+ spud_core (0.9.6)
authlogic
bootstrap-will_paginate
breadcrumbs_on_rails
@@ -22,6 +22,12 @@ def expire_cache_for(record)
if File.directory?(cache_path)
FileUtils.rm_rf(cache_path)
end
+ if Spud::Photos.config.galleries_enabled
+ expire_page photo_galleries_path
+ else
+ expire_page photo_albums_path
+ end
+
if !Spud::Photos.config.page_caches_to_sweep.blank?
Spud::Photos.config.page_caches_to_sweep.each do |route|
expire_page(route)
@@ -30,4 +36,4 @@ def expire_cache_for(record)
end
end
-end
+end
@@ -9,7 +9,7 @@ def change
t.integer :spud_photo_album_id
t.integer :spud_photo_id
end
- add_index :spud_photo_albums, :url_name
- add_index :spud_photo_albums_photos, :spud_photo_album_id
+ add_index :spud_photo_albums, :url_name, :name => "idx_album_url_name"
+ add_index :spud_photo_albums_photos, :spud_photo_album_id, :name => "idx_album_id"
end
-end
+end
@@ -9,7 +9,7 @@ def change
t.integer :spud_photo_gallery_id
t.integer :spud_photo_album_id
end
- add_index :spud_photo_galleries, :url_name
- add_index :spud_photo_galleries_albums, :spud_photo_gallery_id
+ add_index :spud_photo_galleries, :url_name, :name => "idx_gallery_url_name"
+ add_index :spud_photo_galleries_albums, :spud_photo_gallery_id, :name => "idx_gallery_id"
end
-end
+end
@@ -1,5 +1,5 @@
module Spud
module Photos
- VERSION = "0.9.0.2"
+ VERSION = "0.9.1"
end
end

0 comments on commit cbca342

Please sign in to comment.