This is a bit of a tricky one.
When our admin folks are logged on they often open another tab in firefox to preview pages. We use Squid and when these pages are hit they include content that may not be live, but is displayed to the admin.
Because Squid caches the page seen by the admin, all of a sudden it is live for everyone for the duration of the cache timeout!
Anyone got ideas on how to stop this?
cheers,
Richard
In your squid.conf:
acl QUERY urlpath_regex cgi-bin _edit _admin _nocache __lib __fudge
no_cache deny QUERYAnd then Squid will stop caching anything with the /_nocache option. I would then combine that with the new options in Matrix to disable caching on various domains and create a cms.domain.com.au URL for your editors to use (which is set not to cache, so the headers aren't set, so Squid doesn't cache it).
Does that make sense?
[quote]Does that make sense?
[right][post=“9608”]<{POST_SNAPBACK}>[/post][/right][/quote]
Thanks Avi,
The thing that really worries me is that makes perfect sense. I must get out more.
When you say new option, this is in 3.8 ?
We already have the _ paths set to not cahce, and we are due to upgrade to 3.8.1 next week, so I’ll add a new domain now in anticipation.
cheers,
Richard
Its actually a v3.9 option, I'm told.
In v3.9 you can set which URLs to cache on the Cache Manager. Though, I imagine you can achieve the same result by using the new domain name in the regex for Squid.
[quote]Its actually a v3.9 option, I’m told.
In v3.9 you can set which URLs to cache on the Cache Manager. Though, I imagine you can achieve the same result by using the new domain name in the regex for Squid.
[right][post=“9610”]<{POST_SNAPBACK}>[/post][/right][/quote]
Oh right. Dev version. :o Probably best not to go there then…
Brendan is doing the upgrade so I’ll ask him to set it up.
3.8 has an option to order the urls doesn’t it (I don’t want admin.oursite to be the default URL that is used… )
cheers,
Richard
[quote]3.8 has an option to order the urls doesn’t it (I don’t want admin.oursite to be the default URL that is used… )
[right][post=“9612”]<{POST_SNAPBACK}>[/post][/right][/quote]
Not quite: v3.8 is just much better at picking the right URL. If you login to the backend at admin.ourdomain.com.au, it’ll preview at the same URL.
[quote]Not quite: v3.8 is just much better at picking the right URL. If you login to the backend at admin.ourdomain.com.au, it’ll preview at the same URL.
[right][post=“9613”]<{POST_SNAPBACK}>[/post][/right][/quote]
I see. I think an earlier problem we had was asset lisitng with the complete URL were picking the first one of the list, which was dev.*. I pressume you should make the primiary (prefered ) URL for a domain first in the list of URLs?
R
[quote]I see. I think an earlier problem we had was asset lisitng with the complete URL were picking the first one of the list, which was dev.*. I pressume you should make the primiary (prefered ) URL for a domain first in the list of URLs?
[right][post=“9614”]<{POST_SNAPBACK}>[/post][/right][/quote]
No, Matrix should select the most appropriate URL based on the current URL. So, if the user is viewing the site at www.domain.com, Matrix will build www.domain.com URLs (assuming the assets have those URLs).
If this isn’t happening, please let us now.
The underlying reason for the admin content potentially being cached by squid was due to 3.6 not having a clear point of emitting the cache headers, and in this instance was being output regardless of whether the user was logged in. In 3.8, the header output is a little smarter and will only be output if the content has public read permission AND the user viewing it is a public user. In otherwords, cache headers won't be output if you're logged in to the system.
[quote]The underlying reason for the admin content potentially being cached by squid was due to 3.6 not having a clear point of emitting the cache headers, and in this instance was being output regardless of whether the user was logged in. In 3.8, the header output is a little smarter and will only be output if the content has public read permission AND the user viewing it is a public user. In otherwords, cache headers won’t be output if you’re logged in to the system.
[right][post=“9625”]<{POST_SNAPBACK}>[/post][/right][/quote]
Hi Marucs.
Silly question: If you have nested content in a page or asset listings with non live assets, does the page they are in get a “no-cache” directive?
In that case what page actually gets delivered by Squid - the no-cahce page or a page that might already be cached for that URL?
R.
[quote]Silly question: If you have nested content in a page or asset listings with non live assets, does the page they are in get a “no-cache” directive?
[right][post=“9637”]<{POST_SNAPBACK}>[/post][/right][/quote]
If you are viewing the page while logged in, then yes. Especially if you use the /_nocache URL modifier.
If you go to view the page as someone who's logged in (after a public user has primed the squid cache), using the same url as a public user, you'll receive the squid copy of the page (unless you use the _nocache modifier).
[quote]If you go to view the page as someone who’s logged in (after a public user has primed the squid cache), using the same url as a public user, you’ll receive the squid copy of the page (unless you use the _nocache modifier).
[right][post=“9640”]<{POST_SNAPBACK}>[/post][/right][/quote]
Thanks. It looks as though getting admins to use an admin.* url in other tabs when they are logged in (and setting it to not cache) is going to the best option as they often move around the site in that tab. Although thinking about it nocache.radionz.co.nz is probably better semantically…
R