diff options
| author | Stephen Blott | 2015-05-07 10:26:01 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-05-07 10:26:05 +0100 | 
| commit | 0b0ca954d568505934576c2c138a371b48dabbca (patch) | |
| tree | 4ec70be8e2213d3917e21e29ecf899dda7bc1027 /background_scripts/exclusions.coffee | |
| parent | 9fdb630d891019620041041001b9dff022008ee0 (diff) | |
| download | vimium-0b0ca954d568505934576c2c138a371b48dabbca.tar.bz2 | |
Clear RegexpCache when option saved.
Fixes #1641.
Diffstat (limited to 'background_scripts/exclusions.coffee')
| -rw-r--r-- | background_scripts/exclusions.coffee | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/background_scripts/exclusions.coffee b/background_scripts/exclusions.coffee index b3a3960d..5ec76e2a 100644 --- a/background_scripts/exclusions.coffee +++ b/background_scripts/exclusions.coffee @@ -2,6 +2,7 @@ root = exports ? window  RegexpCache =    cache: {} +  clear: -> @cache = {}    get: (pattern) ->      if regexp = @cache[pattern]        regexp @@ -44,8 +45,8 @@ root.Exclusions = Exclusions =      @rules = rules.filter (rule) -> rule and rule.pattern      Settings.set("exclusionRules", @rules) -  postUpdateHook: (rules) -> -    @rules = rules +  postUpdateHook: (@rules) -> +    RegexpCache.clear()  # Development and debug only.  # Enable this (temporarily) to restore legacy exclusion rules from backup.  | 
