Closes #6781: Disable database query caching by default

This commit is contained in:
jeremystretch
2021-07-23 11:34:24 -04:00
parent 8db6033094
commit f2a440d0ae
5 changed files with 14 additions and 13 deletions

View File

@@ -1,6 +1,9 @@
# Caching
NetBox supports database query caching using [django-cacheops](https://github.com/Suor/django-cacheops) and Redis. When a query is made, the results are cached in Redis for a short period of time, as defined by the [CACHE_TIMEOUT](../configuration/optional-settings.md#cache_timeout) parameter (15 minutes by default). Within that time, all recurrences of that specific query will return the pre-fetched results from the cache.
NetBox supports database query caching using [django-cacheops](https://github.com/Suor/django-cacheops) and Redis. When a query is made, the results are cached in Redis for a short period of time, as defined by the [CACHE_TIMEOUT](../configuration/optional-settings.md#cache_timeout) parameter. Within that time, all recurrences of that specific query will return the pre-fetched results from the cache.
!!! warning
In NetBox v2.11.10 and later queryset caching is disabled by default, and must be configured.
If a change is made to any of the objects returned by the query within that time, or if the timeout expires, the results are automatically invalidated and the next request for those results will be sent to the database.

View File

@@ -54,9 +54,9 @@ BASE_PATH = 'netbox/'
## CACHE_TIMEOUT
Default: 900
Default: 0 (disabled)
The number of seconds that cache entries will be retained before expiring.
The number of seconds that cached database queries will be retained before expiring.
---

View File

@@ -13,6 +13,10 @@
* [#6780](https://github.com/netbox-community/netbox/issues/6780) - Include rack location in navigation breadcrumbs
* [#6794](https://github.com/netbox-community/netbox/issues/6794) - Fix device name display on device status view
### Other Changes
* [#6781](https://github.com/netbox-community/netbox/issues/6781) - Database query caching is now disabled by default
---
## v2.11.9 (2021-07-08)