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

Remove the clearcache management command #14458

Closed
jeremystretch opened this issue Dec 7, 2023 · 0 comments
Closed

Remove the clearcache management command #14458

jeremystretch opened this issue Dec 7, 2023 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: deprecation Removal of existing functionality or behavior
Milestone

Comments

@jeremystretch
Copy link
Member

jeremystretch commented Dec 7, 2023

Proposed Changes

Remove the clearcache management command (from the core app), and omit it from the upgrade script.

Justification

This command was introduced back when we were experimenting with query caching, and is no longer needed. I was mistaken; it was actually introduced under #9122 to provide a mechanism for clearing the cached API spec. However, this is also no longer used since we moved to drf-spectacular (see #9608).

The Django cache is currently used only for discrete caching operations, including:

  • Config revision tracking
  • Recording the most recent release
  • Caching RSS feed content (the RSSFeedWidget)

There has already been at least one bug related to this function (see #14182). Additionally, plugins may utilize the cache for other purposes, and we cannot make the assumption that it is safe to clear other cached data.

Impact

Any mechanisms within NetBox or a plugin which employ caching will be responsible for their own cleanup, where applicable.

@jeremystretch jeremystretch added status: under review Further discussion is needed to determine this issue's scope and/or implementation type: deprecation Removal of existing functionality or behavior labels Dec 7, 2023
@jeremystretch jeremystretch added this to the v3.7 milestone Dec 7, 2023
@jeremystretch jeremystretch self-assigned this Dec 7, 2023
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Dec 7, 2023
mtinberg added a commit to mtinberg/ansible-role-netbox that referenced this issue Jan 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: deprecation Removal of existing functionality or behavior
Projects
None yet
Development

No branches or pull requests

1 participant