Skip to main content
The JT-View-Exports-SVG.clearCache command removes all cached data from the extension, forcing a fresh analysis the next time you scan for or view SVG icon exports.

Command Details

Command ID

JT-View-Exports-SVG.clearCache

Display Title

Clear Cache

Category

View Exports SVG
Icon: $(trash) (trash/delete icon)

Availability

This command is available when the View Exports SVG webview panel is active.When condition: activeWebviewPanelId == 'JT-View-Exports-SVG'
The command also appears in the editor title bar when the viewer is open.

Overview

The extension caches scan results and processed icon data to improve performance. However, there are times when you need to clear this cache to ensure you’re seeing current data.

What Gets Cleared

When you clear the cache, the extension removes:
  • Workspace scan results - Cached list of files containing SVG exports
  • Processed icon data - Extracted SVG component information
  • File analysis results - Cached AST parsing and export detection
  • Recently accessed icons - May clear recent icon history
  • Temporary data - Any other cached metadata
Clearing the cache will require a fresh scan/analysis the next time you use the extension, which may take longer for large workspaces.

Usage

From the Editor Title Bar

When the View Exports SVG panel is active:
1

Locate the button

Find the trash icon in the editor title bar (navigation group position 3)
2

Click to clear

Click the trash icon to clear the cache
3

Confirmation

A success message appears: “Cache cleared successfully!”
4

Viewer reloads

The viewer automatically reloads to reflect the cleared state

From Command Palette

1

Open Command Palette

Press Ctrl/Cmd + Shift + P
2

Search for command

Type “View Exports SVG: Clear Cache”
3

Execute

Press Enter to clear the cache
4

Success notification

You’ll see a confirmation message when the cache is cleared

Behavior

  • All cached data is removed from storage
  • Success notification is displayed
  • If the viewer is open, it automatically reloads
  • Next scan will be a fresh analysis
  • First scan after clearing may take longer
  • All files will be re-analyzed from scratch
  • Fresh icon data will be extracted
  • New cache will be built as you use the extension

When to Clear Cache

Files Changed

You’ve modified icon files but changes aren’t reflected in the viewer

Outdated Results

The viewer shows old or stale icon information

Missing Icons

New icon files aren’t appearing in scan results

Corrupted Cache

The extension is behaving unexpectedly or showing errors

Specific Scenarios

Consider clearing the cache when:
  • You’ve reorganized your icon file structure
  • You’ve changed export patterns in icon components
  • You’ve updated file naming conventions
  • The scan results seem incomplete or incorrect
  • You’ve modified ignore patterns or configuration

Button Placement

The clear cache button appears in the editor title bar at:
  • Navigation group position 3 (navigation@3)
  • Located after the DevTools toggle button
  • Always visible when the viewer panel is active

Performance Impact

Cache ManagementThe extension automatically manages cache to balance performance and freshness. Clearing cache is typically only needed when you suspect stale data.

Cache Rebuilding

After clearing cache:
  1. First scan will take longer as all files are re-analyzed
  2. Subsequent operations will be faster as new cache is built
  3. Memory usage may temporarily increase during rebuilding

Configuration

The extension tracks when scans occur:
settings.json
{
  "JT-View-Exports-SVG.lastScanDate": "2024-03-04T10:30:00.000Z"
}
This is a read-only setting that’s automatically updated. Clearing cache may reset this value.
  • Scanning - Run a fresh scan after clearing cache
  • Show Menu - View updated results after clearing cache

Build docs developers (and LLMs) love