Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Prevent Navigation Item from caching old link targets #291

Open
jmurty opened this issue Aug 29, 2017 · 0 comments
Open

Prevent Navigation Item from caching old link targets #291

jmurty opened this issue Aug 29, 2017 · 0 comments

Comments

@jmurty
Copy link
Contributor

jmurty commented Aug 29, 2017

The NavigationItemPlugin and AccountsNavigationItemPlugin content plugins currently cache their output.

This is a problem because the rendered output will not be updated for some situations, for example if you change the URL location of a Page referenced by a NavigationItem the old URL will continue being rendered until you clear the cache.

The brute-force fix is to add the cache_output = False attribute to these plugins.

A better fix, and one we should start using in general, is to figure out how to generate a sensible cache key and override the get_output_cache_key() method of ContentPlugin so that we can benefit from caching but have that cache invalidated when appropriate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant