[PR #3069] [MERGED] intial work on #2647 - caching #12493

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/3069
Author: @lampwins
Created: 4/15/2019
Status: Merged
Merged: 4/15/2019
Merged by: @jeremystretch

Base: develop-2.6Head: 2647-caching


📝 Commits (5)

📊 Changes

15 files changed (+148 additions, -11 deletions)

View changed files

📝 .travis.yml (+1 -0)
📝 base_requirements.txt (+4 -0)
📝 netbox/circuits/views.py (+5 -0)
📝 netbox/dcim/views.py (+22 -0)
📝 netbox/extras/views.py (+9 -0)
📝 netbox/ipam/views.py (+13 -0)
📝 netbox/netbox/configuration.example.py (+22 -10)
📝 netbox/netbox/settings.py (+30 -1)
📝 netbox/netbox/views.py (+6 -0)
📝 netbox/secrets/views.py (+3 -0)
📝 netbox/tenancy/views.py (+4 -0)
📝 netbox/utilities/api.py (+18 -0)
📝 netbox/utilities/views.py (+4 -0)
📝 netbox/virtualization/views.py (+6 -0)
📝 requirements.txt (+1 -0)

📄 Description

Fixes: #2647

This implements caching via Redis using django-redis. This officially makes Redis required for NetBox.

I also implemented basic support for django-prometheus because I strongly feel that with the addition of caching, we need to provide more visibility into application performance. This will also aid in development down the road.

This still needs to have docs writen for caching in general and the new configuration settings.

As for review, much of this is rather boring; the only real meat here is in settings.py.


🔄 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/3069 **Author:** [@lampwins](https://github.com/lampwins) **Created:** 4/15/2019 **Status:** ✅ Merged **Merged:** 4/15/2019 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.6` ← **Head:** `2647-caching` --- ### 📝 Commits (5) - [`f050547`](https://github.com/netbox-community/netbox/commit/f0505477b8ff76d2fdb002cd1378c84d7b2ce53f) intial work on #2647 - caching - [`c11abbe`](https://github.com/netbox-community/netbox/commit/c11abbe8ca1d0f848b90033cd82c673b4eed8349) pep8 and postgres backend - [`cdff29c`](https://github.com/netbox-community/netbox/commit/cdff29c7d502d1ecb734dccc288e80b88467203e) add redis to travis builds - [`4723ddb`](https://github.com/netbox-community/netbox/commit/4723ddb5ce68fd9f772fa95da2052b75e931c6ac) move caching to views - [`351736c`](https://github.com/netbox-community/netbox/commit/351736cc6d5a4ddb40dc56cf8d05b312858b1195) Merge branch 'develop-2.6' into 2647-caching ### 📊 Changes **15 files changed** (+148 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `.travis.yml` (+1 -0) 📝 `base_requirements.txt` (+4 -0) 📝 `netbox/circuits/views.py` (+5 -0) 📝 `netbox/dcim/views.py` (+22 -0) 📝 `netbox/extras/views.py` (+9 -0) 📝 `netbox/ipam/views.py` (+13 -0) 📝 `netbox/netbox/configuration.example.py` (+22 -10) 📝 `netbox/netbox/settings.py` (+30 -1) 📝 `netbox/netbox/views.py` (+6 -0) 📝 `netbox/secrets/views.py` (+3 -0) 📝 `netbox/tenancy/views.py` (+4 -0) 📝 `netbox/utilities/api.py` (+18 -0) 📝 `netbox/utilities/views.py` (+4 -0) 📝 `netbox/virtualization/views.py` (+6 -0) 📝 `requirements.txt` (+1 -0) </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: #2647 <!-- Please include a summary of the proposed changes below. --> This implements caching via Redis using `django-redis`. This officially makes Redis required for NetBox. I also implemented basic support for `django-prometheus` because I strongly feel that with the addition of caching, we need to provide more visibility into application performance. This will also aid in development down the road. This still needs to have docs writen for caching in general and the new configuration settings. As for review, much of this is rather boring; the only real meat here is in settings.py. --- <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:21:54 +01:00
adam closed this issue 2025-12-29 22:21:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12493