fix: add refresh_seconds to enable caching#7
Merged
Conversation
PluginBase.get_data() only caches when the manifest declares refresh_seconds in settings_schema.properties. Without it, every poll (~14s) reruns datetime.now() + the TNG stardate math even though the displayed value (1 decimal, ~1000 units/year) only changes meaningfully every ~8-9 minutes. Add refresh_seconds (default 60s, min 10s) and min_refresh_seconds to opt in to caching, eliminating redundant CPU and downstream re-renders between meaningful updates. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
refresh_seconds(default 60s, min 10s, max 3600s) tosettings_schema.propertiesandmin_refresh_seconds: 10at the top level soPluginBase.get_data()will cache results.Why
PluginBase.get_data()in FiestaBoard only caches when the manifest declaresrefresh_seconds. Without it, every poll (~14s) rerunsdatetime.now()+ the TNG stardate math even though the displayed value (1 decimal, ~1000 units/year ≈ 0.114 units/hour) only changes meaningfully every ~8-9 minutes. Addingrefresh_secondsavoids redundant CPU and downstream re-renders between meaningful updates.Test plan
🤖 Generated with Claude Code