Skip to content

Remove caching infrastructure and add multiline regex search support - #16

Merged
nikryden merged 3 commits into
masterfrom
newTest-2
Mar 31, 2026
Merged

nikryden merged 3 commits into
masterfrom
newTest-2

Conversation

@nikryden

Copy link
Copy Markdown
Owner

This pull request removes the in-memory LRU cache implementation and its interfaces, along with related configuration and tests, in favor of persistent caching (such as the SQLite cache). It also introduces support for multiline regex search and updates search highlighting logic to support this feature. Additionally, default filters are added for log filtering.

Key changes:

Removal of in-memory caching

  • Removed the LRUCache class and its interface ICache from the codebase, along with all related tests and configuration settings (CacheSize, EnableIndexing). This shifts caching responsibility to persistent solutions like the SQLite cache. [1] [2] [3] [4] [5] [6] [7]

Search and filter improvements

  • Added a UseMultilineRegex property to AppSettings and updated the SearchResultHighlighter to support multiline regex search, including a new UseMultiline property and logic to handle regex options accordingly. [1] [2] [3]

Filters

  • Added a default set of log filters in filters.json, including filters for errors, warnings, info, and several regex-based searches (GUIDs, emails, IPs, and custom patterns).

…ngs)

- Delete ICache<TKey,TValue> interface, LRUCache<TKey,TValue> implementation, and SqliteLogCache
- Remove CacheSize and EnableIndexing settings from AppSettings
- Remove cache management UI (Clear Cache button, cache size input) from SettingsWindow
- Remove ClearCacheAsync command, CacheSize and EnableIndexing properties from SettingsViewModel
- Remove LRUCacheTests and update AppSettingsTests/SettingsServiceTests accordingly
- Add UseMultilineRegex setting to AppSettings (persisted to disk)
- Add UseMultiline property to SearchResultHighlighter; when enabled, uses
  Singleline|Multiline regex flags so '.' spans newlines and matches are
  highlighted across line boundaries via ColorizeLineFromResults()
- Add UseMultilineRegex observable property to MainViewModel with
  OnUseMultilineRegexChanged handler that invalidates cached regex,
  fires OnMultilineRegexModeChanged event, and saves the setting
- Wire OnMultilineRegexModeChanged in MainWindow.xaml.cs to update the
  highlighter and re-execute search / filter when active
- Move the regex (.*)  checkbox next to the search box and add a new
  multiline toggle button (≡) that is only enabled when regex mode is on
- Update ApplySearchFilter to handle multiline matches spanning multiple
  lines and show 'multiline regex' in status text
@nikryden
nikryden merged commit ea5317a into master Mar 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant