Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt at setting sane cache values #158

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Attempt at setting sane cache values #158

merged 1 commit into from
Sep 23, 2024

Conversation

vincentwolsink
Copy link
Owner

No description provided.

Copy link

@vincentwolsink vincentwolsink merged commit 25112bc into main Sep 23, 2024
5 checks passed
@vincentwolsink vincentwolsink deleted the cache branch September 23, 2024 18:41
"installer_required": True,
"optional": True,
},
# Netprofile endpoints
"installer_agf": {
"url": "https://{}/installer/agf/index.json",
"cache": 10,
"cache": 3600,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to keep this as before (basically uncached). I use automation to switch grid profiles based on the current wholesale export price on the grid. Since the price changes very quickly (update every few minutes), the grid profile can also be switched very quickly. It would be good to monitor what the system thinks the current grid profile is as the grid profile switches.

I have been puzzled by that the grid profile sensor isn't updating as quickly as before after an update. I guess this is the culprit.

If we want to keep the traffic low, it could alternatively try to invalidate the cache when set grid profile action is invoked?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually invalidate the cache already here. But if there is a delay in the Envoy updating the value this might not work. Since this specific endpoint is pretty fast I can disable caching again.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it delays by like a minute or two, so yeah probably invalidating the cache isn't enough.

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.

2 participants