Clear Error Tracking cache on demand
We need the ability to clear the ReactiveCache for thee Error tracking list.
There are currently two places so far where we need this:
- After an Error is ignored or resolved (#197122 (closed))
- When loading the Error Tracking list and there are none found, and we show the "Check again" link.
Currently we cache key we save contains params we receive from the controller. This creates many cache key possibilities.
It looks like we can use ActiveSupport::Cache::RedisCacheStore#delete_matched to match a prefix.
For example:
Rails.cache.delete_matched("error_tracking_project_error_tracking_setting:20:list_issues*")
will delete all caches of the Error Tracking list regardless of the params given (sort order, etc).
Edited by Sean Arnold