[PR #3434] [MERGED] Cache invalidation #12562

Closed
opened 2025-12-29 22:22:20 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3434
Author: @lampwins
Created: 8/19/2019
Status: Merged
Merged: 8/22/2019
Merged by: @jeremystretch

Base: developHead: 3428-cache-invalidation


📝 Commits (7)

  • ade844f fixes #3428 - caching invalidation issues
  • c54f2e3 remove blank line after update call
  • c359ac5 convert update() calls to save() calls
  • f0f1ef2 fix signals update call
  • 3d2a738 #3428 changelog
  • 63c3f42 Merge branch 'develop' into 3428-cache-invalidation
  • 46bedc6 missed a merge conflict resolution

📊 Changes

28 files changed (+257 additions, -292 deletions)

View changed files

📝 CHANGELOG.md (+2 -1)
📝 docs/additional-features/reports.md (+1 -1)
📝 docs/development/extending-models.md (+1 -1)
📝 netbox/circuits/api/views.py (+2 -2)
📝 netbox/circuits/models.py (+1 -1)
📝 netbox/circuits/signals.py (+5 -1)
📝 netbox/circuits/views.py (+8 -14)
📝 netbox/dcim/api/views.py (+34 -68)
📝 netbox/dcim/forms.py (+6 -6)
📝 netbox/dcim/models.py (+11 -4)
📝 netbox/dcim/signals.py (+10 -2)
📝 netbox/dcim/views.py (+70 -72)
📝 netbox/extras/api/views.py (+2 -2)
📝 netbox/extras/forms.py (+9 -5)
📝 netbox/extras/models.py (+2 -2)
📝 netbox/extras/views.py (+3 -5)
📝 netbox/ipam/api/views.py (+9 -16)
📝 netbox/ipam/filters.py (+1 -1)
📝 netbox/ipam/views.py (+34 -38)
📝 netbox/netbox/api.py (+1 -1)

...and 8 more files

📄 Description

Fixes: #3428

Changed all uses of select_related() to prefetch_related(). Also changed relivant uses of update() to invalidated_update().


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/3434 **Author:** [@lampwins](https://github.com/lampwins) **Created:** 8/19/2019 **Status:** ✅ Merged **Merged:** 8/22/2019 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `3428-cache-invalidation` --- ### 📝 Commits (7) - [`ade844f`](https://github.com/netbox-community/netbox/commit/ade844f7a79c766cc2eb9b71a9b877ec5e4e2d45) fixes #3428 - caching invalidation issues - [`c54f2e3`](https://github.com/netbox-community/netbox/commit/c54f2e3e40f244dae72ff21199ce8273ca6782e4) remove blank line after update call - [`c359ac5`](https://github.com/netbox-community/netbox/commit/c359ac57372a8a549eca449caecdceba0b6081d1) convert update() calls to save() calls - [`f0f1ef2`](https://github.com/netbox-community/netbox/commit/f0f1ef2ef24c7949669fa15020f3446638ea04e1) fix signals update call - [`3d2a738`](https://github.com/netbox-community/netbox/commit/3d2a738f449142ffba2aff79c5bc73a304687494) #3428 changelog - [`63c3f42`](https://github.com/netbox-community/netbox/commit/63c3f423c291f7f9611c02a5fb9393d09fabf782) Merge branch 'develop' into 3428-cache-invalidation - [`46bedc6`](https://github.com/netbox-community/netbox/commit/46bedc61567912c39c76d1aed2c4ad16bb5d77bd) missed a merge conflict resolution ### 📊 Changes **28 files changed** (+257 additions, -292 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -1) 📝 `docs/additional-features/reports.md` (+1 -1) 📝 `docs/development/extending-models.md` (+1 -1) 📝 `netbox/circuits/api/views.py` (+2 -2) 📝 `netbox/circuits/models.py` (+1 -1) 📝 `netbox/circuits/signals.py` (+5 -1) 📝 `netbox/circuits/views.py` (+8 -14) 📝 `netbox/dcim/api/views.py` (+34 -68) 📝 `netbox/dcim/forms.py` (+6 -6) 📝 `netbox/dcim/models.py` (+11 -4) 📝 `netbox/dcim/signals.py` (+10 -2) 📝 `netbox/dcim/views.py` (+70 -72) 📝 `netbox/extras/api/views.py` (+2 -2) 📝 `netbox/extras/forms.py` (+9 -5) 📝 `netbox/extras/models.py` (+2 -2) 📝 `netbox/extras/views.py` (+3 -5) 📝 `netbox/ipam/api/views.py` (+9 -16) 📝 `netbox/ipam/filters.py` (+1 -1) 📝 `netbox/ipam/views.py` (+34 -38) 📝 `netbox/netbox/api.py` (+1 -1) _...and 8 more files_ </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #3428 Changed all uses of `select_related()` to `prefetch_related()`. Also changed relivant uses of `update()` to `invalidated_update()`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:22:20 +01:00
adam closed this issue 2025-12-29 22:22:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12562