Renaming page requires cache clearing.....is that ok?
Permalink
Hi all...a comment and a question:
If you have a page, and change its canonical name things like the image block will go to a "page not found" error page unless the cache is cleared.
My question: If I have many people adding pages, and mistyping the name of a page, or doing something that requires them to change the page name, why does not the canonical name change function either clear the cache itself, or just clear the part of the cache that deals with the canonical names throughout the site, or even for that particular entry?
I can see a future where I have people making changes and I would keep getting requests to "fix pathing" or "solve this weird problem with my new page not showing up" as the admin, when the page name change functionality should just do that by itself.
...Or at least throw a message saying that the canonical name change will likely require a cache clearing. Otherwise people just think the site is broken, in that they were not warned that there was a required extra step in changing a page name.
Is that a documentation bug in the workflow of not notifying users that there is an extra step required they might not know about, or am I missing something?
Nick
If you have a page, and change its canonical name things like the image block will go to a "page not found" error page unless the cache is cleared.
My question: If I have many people adding pages, and mistyping the name of a page, or doing something that requires them to change the page name, why does not the canonical name change function either clear the cache itself, or just clear the part of the cache that deals with the canonical names throughout the site, or even for that particular entry?
I can see a future where I have people making changes and I would keep getting requests to "fix pathing" or "solve this weird problem with my new page not showing up" as the admin, when the page name change functionality should just do that by itself.
...Or at least throw a message saying that the canonical name change will likely require a cache clearing. Otherwise people just think the site is broken, in that they were not warned that there was a required extra step in changing a page name.
Is that a documentation bug in the workflow of not notifying users that there is an extra step required they might not know about, or am I missing something?
Nick
Interesting, I would post a bug report as this seems valid, I don't get your example with the image block though...
Hi Mnkras,
Oh, I was just taking an example block that I know shows this issue....when you add an image block that references a page via a selected link, then you go and change that referenced page's canonical name, the image block's link still looks at the old page until you clear the cache...
Oh, I was just taking an example block that I know shows this issue....when you add an image block that references a page via a selected link, then you go and change that referenced page's canonical name, the image block's link still looks at the old page until you clear the cache...
This makes sense because if a block caches it's view it really doesn't know what it's caching. Just it's output. So it will happily go about dumping it's view output without ever checking anything.
I would doubt that there would be a way to know which blocks have cached output that contains that page's name. So the alternative would be to just clear the whole cache with like a Cache::flush(); which would be pretty aggressive, especially on a large site with moderate traffic.
If it's not a big site you could hook into the on_page_update and flush the cache or flush it only on blocks you know are giving you problems with this.
At least that's how I understand it at this point.
I would doubt that there would be a way to know which blocks have cached output that contains that page's name. So the alternative would be to just clear the whole cache with like a Cache::flush(); which would be pretty aggressive, especially on a large site with moderate traffic.
If it's not a big site you could hook into the on_page_update and flush the cache or flush it only on blocks you know are giving you problems with this.
At least that's how I understand it at this point.