Epic: B
Depends on: TP-13
Source: docs/theme-parser-github-issues.md
Goal
Avoid repeated file reads and parsing when switching between themes.
Files
lib/core/theme/theme_registry_service.dart
test/core/theme/theme_registry_cache_test.dart
Implementation
Inside ThemeRegistryService:
- cache
QueryaTheme by definition.stableCacheKey;
- max entries: 12 or 20;
- on cache hit, return cached theme;
- on content hash change, key changes naturally;
- expose
clearCache() for tests/reset.
If current project has no LRU helper, implement tiny private LRU using LinkedHashMap.
Acceptance Criteria
- Loading same definition twice parses once.
- Loading changed file parses again.
- Cache evicts oldest entry after limit.
Tests
- fake parser counter or temp file mutation;
- cache hit;
- cache invalidation by hash;
- eviction.
Epic: B
Depends on: TP-13
Source:
docs/theme-parser-github-issues.mdGoal
Avoid repeated file reads and parsing when switching between themes.
Files
lib/core/theme/theme_registry_service.darttest/core/theme/theme_registry_cache_test.dartImplementation
Inside
ThemeRegistryService:QueryaThemebydefinition.stableCacheKey;clearCache()for tests/reset.If current project has no LRU helper, implement tiny private LRU using
LinkedHashMap.Acceptance Criteria
Tests