caching with varnish reverse proxy [solved]

General project discussion. NOT for help questions.
Locked
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

caching with varnish reverse proxy [solved]

Post by HarmO »

I'm looking to transfer my websites to gandi.net hosting.
this hosting uses a reverse proxy called Varnish to cache content and thus speed up the website. I have already some WP sites set up and using a plugin, the results are blazing fast websites !

But there is a problem with CMSMS. I asked gandi.net, but Varnish cache does not work if you use cookies and as you may know, CMSMS uses a session cookie.

My questions:
  • Is there a way to disable the session cookie?
  • How do i control the "cache control" header of a web page with CMSMS? do i just add it in the htaccess?
Last edited by HarmO on Mon Oct 20, 2014 8:53 am, edited 1 time in total.
Kind regards,
HarmO
JohnnyB
Dev Team Member
Dev Team Member
Posts: 729
Joined: Tue Nov 21, 2006 5:05 pm
Location: OH, USA

Re: caching with varnish reverse proxy

Post by JohnnyB »

Is there a way to disable the session cookie?
- no probably not without modifying the file that sends the cookie. -- and that is not recommended.

How do i control the "cache control" header of a web page with CMSMS? do i just add it in the htaccess?
-- there are server settings that can be set to do this in server config files and or in .htaccess - ask your host.
But, I believe, any cache control written into a local file script may be able to override server settings...

I would disable Varnish in your case and then try something like CloudFlare.com instead which will provide some similar benefits without the restrictions.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

Re: caching with varnish reverse proxy

Post by HarmO »

I was going to use a CDN, but there is a mayor difference between a CDN and (serverside) Caching. I see that the proposed cloudflaire has some kind of caching service too, but the big question will be if it works for the webpages with the session cookie that CMSMS creates?

If you have some 100 pages of which only a few change regularly, why should my website do DB connections for those pages that don't change? The HTML output can be generated and then cached. of course the cache has to be removed if you update the webpage.

Since i already have my hosting account, and i want to make use of the varnish caching that is included in my account, is there no global setting, line of code for the config.php file or template-tag that allows us to disable the session cookie?
Kind regards,
HarmO
JohnnyB
Dev Team Member
Dev Team Member
Posts: 729
Joined: Tue Nov 21, 2006 5:05 pm
Location: OH, USA

Re: caching with varnish reverse proxy

Post by JohnnyB »

" but the big question will be if it works for the webpages with the session cookie that CMSMS creates"
--Yes, I have several CMSMS sites running through cloudflare.com

For your other question, I don't think so, since the nature of CMSMS is to be dynamic and update information (things like calendar events, news articles that are set to publish at a later date, etc) as needed. A CMSMS core developer would need to answer.
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: caching with varnish reverse proxy

Post by calguy1000 »

There is no possible way at this moment to disable the session cookie.
Removing the session cookie (even for the frontend) could have negative effects on many modules.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

Re: caching with varnish reverse proxy

Post by HarmO »

Ok
good to know,

i chose other hosting for the CMSMS projects ...
Kind regards,
HarmO
Locked

Return to “General Discussion”