diff options
author | Alex Legler <alex@a3li.li> | 2016-08-10 12:57:20 +0200 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2016-08-10 12:57:20 +0200 |
commit | 29e0977d7c31291e0c6382171adce91e465ac3bf (patch) | |
tree | a72244128132b6c205715cac3024ca215512ee0f /lib/kkuleomi | |
parent | Don't cache package header (diff) | |
download | packages-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.rb | 2 | ||||
-rw-r--r-- | lib/kkuleomi/store/models/version_import.rb | 1 |
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 |