LSCache WordPress/IP.Board/Magento & General .htaccess q

cmanns

Well-Known Member
#1
Is there any general style to making php sites with friendly url's and such to be cache'd?

Also on a shared cpanel system, clicking cache requests with cookies (Loading a page with cookies) makes all vhosts cache alot (Forums and such with logged in users)

that can be set per vhost if left to no in the lsws admin panel? :D
 

webizen

Well-Known Member
#2
put cache rules in front of other rewrite rules (for friendly url's).

# excluding certain URLs
RewriteCond %{REQUEST_URI} !/(login|register|usercp|private|profile|cron|image)\.php$

# cache for 2 mins for php pages only
RewriteRule (.*\.php)?$ – [E=Cache-Control:max-age=120]

# rewrite rules for friendly url's
RewriteRule ....
Will get back to you regarding cache with cookies in a bit.
 

cmanns

Well-Known Member
#3
put cache rules in front of other rewrite rules (for friendly url's).



Will get back to you regarding cache with cookies in a bit.
thanks.

Majorly curious where it should be set, Yes made vhosts I didnt even put .htaccess cache stuff in, on cache.

Anyawys so magento apparently has a 500 dollar paid mod, screw that. I'm trying to figure out how to get it to say no cache header but besides that lets cache only the basics

Code:
/customer/account/login/
/checkout/cart/
/customer/account/login/
/wishlist/
/checkout/
#Search Queries
/catalogsearch/advanced/
/catalogsearch/result/?q=belt
/catalogsearch/result/index/?p=5&q=belt
#End
/fashion-jewelry/necklaces.html
^The sites all .html friendly urls.
 

cmanns

Well-Known Member
#5
here is the rule to set no cache header
thanks.

So I'm curious is LS Cache a final product? Seems to need quite some buffing.

I enable cache, enable it for one cpanel vhost in .htaccess WHAM every php site's caching nearly everything and client's visitors are showing logged in as eachother :eek:

Also is there any official WordPress/IPB/etc cache settings yet?
 

webizen

Well-Known Member
#7
#8
@webizen: Any chance of getting a general guide for Wordpress setup using LiteSpeed Cache. Specifically in dealing with wp-admin and logged in user requests.
 
#10
Thanks. Can you provide any specific guidance on how the exclude works?

For example, is this what I would need to exclude all wpadmin requests from being cached?

Code:

# excluding certain URLs
  RewriteCond %{REQUEST_URI} !/(wpadmin) \.php$

 

webizen

Well-Known Member
#11
you can enable private cache and put /wpadmin/ in 'do-not-cache URL' box.

Sample configuration is as follows:

Admin CP -> Configuration -> Server -> Cache
Storage Path: /diskcache
Max Object Size: 512 KB
Enable Private Cache: Yes
Private Cache Expire Time (seconds): 120
Do-Not-Cache URL: /wpadmin/
 
Top