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

NAUTOBOT_DYNAMIC_GROUPS_MEMBER_CACHE_TIMEOUT is documented but not honored #4700

Closed
u1735067 opened this issue Oct 24, 2023 · 1 comment · Fixed by #4773
Closed

NAUTOBOT_DYNAMIC_GROUPS_MEMBER_CACHE_TIMEOUT is documented but not honored #4700

u1735067 opened this issue Oct 24, 2023 · 1 comment · Fixed by #4773
Assignees
Labels
type: bug Something isn't working as expected type: documentation Improvements or additions to documentation

Comments

@u1735067
Copy link
Contributor

u1735067 commented Oct 24, 2023

Environment

  • Nautobot version (Docker tag too if applicable): 1.6.4
  • Python version: 3.11
  • Database platform, version: pg

Steps to Reproduce

  1. Set the NAUTOBOT_DYNAMIC_GROUPS_MEMBER_CACHE_TIMEOUT=5 environment variable and start Nautobot
  2. Watch the start log

Expected Behavior

Not

Refreshing dynamic group member caches...
DYNAMIC_GROUPS_MEMBER_CACHE_TIMEOUT is set to 0; skipping cache refresh

Observed Behavior

Refreshing dynamic group member caches...
DYNAMIC_GROUPS_MEMBER_CACHE_TIMEOUT is set to 0; skipping cache refresh

Additional informations

https://github.com/search?q=repo%3Anautobot%2Fnautobot%20NAUTOBOT_DYNAMIC_GROUPS_MEMBER_CACHE_TIMEOUT&type=code 😬

Also, is it normal to have a difference with CONTENT_TYPE_CACHE_TIMEOUT (not in constance), tech limitation maybe?

@u1735067 u1735067 added triage This issue is new and has not been reviewed. type: bug Something isn't working as expected labels Oct 24, 2023
@lampwins lampwins added type: documentation Improvements or additions to documentation and removed triage This issue is new and has not been reviewed. labels Nov 3, 2023
@gsnider2195
Copy link
Contributor

@u1735067 this is an error in the documentation. Since DYNAMIC_GROUPS_MEMBER_CACHE_TIMEOUT is a constance configuration, it doesn't support Environment variables.

Also, is it normal to have a difference with CONTENT_TYPE_CACHE_TIMEOUT (not in constance), tech limitation maybe?

We decided not to use constance for this setting to improve performance since constance requires a trip to the database to retrieve the value of the setting. See this comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected type: documentation Improvements or additions to documentation
Projects
No open projects
Status: Done
4 participants