aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb10
-rw-r--r--Library/Homebrew/tab.rb2
2 files changed, 8 insertions, 4 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 5434d87c2..84c2fb7a7 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -1337,10 +1337,14 @@ class Formula
end
end
- # Clear caches of .racks and .installed.
- # @private
- def self.clear_cache
+ # Clear cache of .racks
+ def self.clear_racks_cache
@racks = nil
+ end
+
+ # Clear caches of .racks and .installed.
+ def self.clear_installed_formulae_cache
+ clear_racks_cache
@installed = nil
end
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 6b274b143..3bb7d8b62 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -319,7 +319,7 @@ class Tab < OpenStruct
def write
# If this is a new installation, the cache of installed formulae
# will no longer be valid.
- Formula.clear_cache unless tabfile.exist?
+ Formula.clear_installed_formulae_cache unless tabfile.exist?
CACHE[tabfile] = self
tabfile.atomic_write(to_json)