aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2016-08-10 12:57:20 +0200
committerAlex Legler <alex@a3li.li>2016-08-10 12:57:20 +0200
commit29e0977d7c31291e0c6382171adce91e465ac3bf (patch)
treea72244128132b6c205715cac3024ca215512ee0f /lib/kkuleomi
parentDon't cache package header (diff)
downloadpackages-5-29e0977d7c31291e0c6382171adce91e465ac3bf.tar.gz
packages-5-29e0977d7c31291e0c6382171adce91e465ac3bf.tar.bz2
packages-5-29e0977d7c31291e0c6382171adce91e465ac3bf.zip
Manually expire changelog cache
This should hopefully relieve the load the repeated `git log' calls cause.
Diffstat (limited to 'lib/kkuleomi')
-rw-r--r--lib/kkuleomi/store/models/package_import.rb2
-rw-r--r--lib/kkuleomi/store/models/version_import.rb1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/kkuleomi/store/models/package_import.rb b/lib/kkuleomi/store/models/package_import.rb
index caea415..3b12d8a 100644
--- a/lib/kkuleomi/store/models/package_import.rb
+++ b/lib/kkuleomi/store/models/package_import.rb
@@ -47,6 +47,8 @@ module Kkuleomi::Store::Models::PackageImport
package: name
)
end
+
+ Rails.cache.delete("changelog/#{package_model.to_cp}")
end
def set_basic_metadata(package_model, latest_ebuild)
diff --git a/lib/kkuleomi/store/models/version_import.rb b/lib/kkuleomi/store/models/version_import.rb
index c18344e..b4e4caf 100644
--- a/lib/kkuleomi/store/models/version_import.rb
+++ b/lib/kkuleomi/store/models/version_import.rb
@@ -50,6 +50,7 @@ module Kkuleomi::Store::Models::VersionImport
) if options[:package_state] != 'new' && options[:version_state] == 'new'
process_keyword_diff(old_keywords, keywords, parent_package) unless old_keywords == keywords
+ Rails.cache.delete("changelog/#{parent_package.atom}")
end
end