LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > LiteSpeed Cache > Private cache max-age ?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2013, 02:08 AM
Monarobase Monarobase is offline
Senior Member
 
Join Date: Jan 2013
Posts: 95
Default Private cache max-age ?

Hello,

Your wiki says to use E=Cache-Control:max-age=60 for 60 seconds public cache and E=Cache-Control:private for private cache.

Both of these work with .htaccess and mod_rewrite rules

Can I set the max-age for private cache in htacess files ?

Or can users only use the server global defined private cache max-age value ?

Thanks
Reply With Quote
  #2  
Old 02-12-2013, 12:15 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
Quote:
Can I set the max-age for private cache in htacess files ?
yes. just tested and confirm it works.
Reply With Quote
  #3  
Old 02-12-2013, 12:25 AM
Monarobase Monarobase is offline
Senior Member
 
Join Date: Jan 2013
Posts: 95
Thanks,

How would I do this ? All my tries failed…
Reply With Quote
  #4  
Old 02-12-2013, 12:29 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
for example, in .htaccess,
Code:
RewriteRule \.php - [E=Cache-Control:private,E=Cache-Control:max-age=300]
or
Code:
RewriteRule \.php - [E=Cache-Control:private]
RewriteRule \.php - [E=Cache-Control:max-age=300]
Reply With Quote
  #5  
Old 02-12-2013, 01:03 AM
Monarobase Monarobase is offline
Senior Member
 
Join Date: Jan 2013
Posts: 95
Thanks,

I was under the impression that those lines would first set the envrionement variable to private and then replace the private setting by max-age=300 thus being the equivalent of only max-age=300…

With Apache's mod_cache, Cache-Control should be set to :

"max-age=300, private"
Reply With Quote
  #6  
Old 02-12-2013, 01:32 AM
Monarobase Monarobase is offline
Senior Member
 
Join Date: Jan 2013
Posts: 95
I've just tested :

RewriteRule \.php - [E=Cache-Controlrivate,E=Cache-Control:max-age=300]
Code:
X-LiteSpeed-Cache : hit

RewriteRule \.php - [E=Cache-Controlrivate]
Code:
X-LiteSpeed-Cache : hit,private
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:52 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.