Skip to content

Conversation

@sebdiem
Copy link
Contributor

@sebdiem sebdiem commented Jan 17, 2019

Description

Closes #5660

Trying to register new routes on a router after having accessed the
router urls attribute leads to surprising results.
The route is added without error to the router's registry but the urls
are not updated, because they are cached in _urls.
This commit invalidates the cache after each new registration.

see encode#5660

Trying to register new routes on a router after having accessed the
router `urls` attribute leads to surprising results.
The route is added without error to the router's `registry` but the urls
are not updated, because they are cached in `_urls`.
This commit invalidates the cache after each new registration.
@sebdiem sebdiem force-pushed the sdr/invalidate_cache_on_register branch from 3e56aa1 to 40c204b Compare January 17, 2019 12:49
@lovelydinosaur lovelydinosaur merged commit 822b85a into encode:master Jan 17, 2019
@lovelydinosaur
Copy link
Contributor

Thanks!

@lovelydinosaur lovelydinosaur added this to the 3.9.2 Release milestone Jan 17, 2019
pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request Nov 17, 2020
see encode#5660

Trying to register new routes on a router after having accessed the
router `urls` attribute leads to surprising results.
The route is added without error to the router's `registry` but the urls
are not updated, because they are cached in `_urls`.
This commit invalidates the cache after each new registration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants