I have an issue where my cache isn’t working for post because of a model I use. I remove the /blog/ part of my posts with a model (see this forum thread for details). Since then I’ve changed url() for cleanurl() so wherever I call cleanurl it gives me the url without /blog/.
That works great, but because of this model, caching isn’t working. If I visit my homepage, I see the comment at the bottom of the html that confirms it’s cached. If I go to a “cleanurl” there’s no cache. However, if I add /blog/ to the url, I see the cache.
So I now either need to fix the caching issue so that cleanurls are cached (my preferred method) or somehow revert the entire cleanurl change and go back to using /blog/ in my URLs. If go down this route though, I’ll need a way to automatically redirect children of the blog page from the cleanurl to the /blog/ url.
I got some time away from the keyboard, walked the dogs and cleared my head. Came back, read this, and knew exactly the change I needed to make. Thanks Sonja.
I’ve just gone to write a new post, but I can no longer preview drafts, I get a 404. I assume it’s something to do with the edited route. Here’s what it looks like: