-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.1.11
Python version
3.8
Steps to Reproduce
- Install Netbox v3.0.5+
- Fetch http://netbox/api/docs/?format=openapi to populate Redis cache
- Update to another Netbox version.
- Fetch http://netbox/api/docs/?format=openapi and get the old openapi definition
Expected Behavior
The correct openapi definition should be returned.
Observed Behavior
Stale cached version of the openapi definition is returned.
Honestly I'm not 100% sure why this is happening. My reading of the Django cache documentation (https://docs.djangoproject.com/en/4.0/topics/cache/ and https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CACHES-KEY_FUNCTION) makes it sound like the cache should use the Netbox version as a key, which would make it a different entry in the cache so this shouldn't be a problem.
Hopefully someone with more knowledge about Django caching can reproduce this and figure out why this is happening.
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application