Skip to content

fix: add refresh_seconds to enable caching#7

Merged
jeffredodd merged 2 commits into
mainfrom
fix/add-refresh-seconds
Jun 7, 2026
Merged

fix: add refresh_seconds to enable caching#7
jeffredodd merged 2 commits into
mainfrom
fix/add-refresh-seconds

Conversation

@jeffredodd

Copy link
Copy Markdown
Member

Summary

  • Add refresh_seconds (default 60s, min 10s, max 3600s) to settings_schema.properties and min_refresh_seconds: 10 at the top level so PluginBase.get_data() will cache results.
  • Bump manifest version to 1.1.1.

Why

PluginBase.get_data() in FiestaBoard only caches when the manifest declares refresh_seconds. Without it, every poll (~14s) reruns datetime.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. Adding refresh_seconds avoids redundant CPU and downstream re-renders between meaningful updates.

Test plan

  • Manifest JSON validates.
  • Change is purely additive (new optional setting, new top-level field, version bump); no code changes required.
  • CI plugin tests pass.

🤖 Generated with Claude Code

Jeffrey Johnson and others added 2 commits June 6, 2026 18:56
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>
@jeffredodd jeffredodd merged commit 7691be4 into main Jun 7, 2026
1 check 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