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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > LiteSpeed Cache > Wrong cache hit

Reply
 
Thread Tools Display Modes
  #1  
Old 06-09-2011, 05:21 PM
IrPr IrPr is offline
Senior Member
 
Join Date: Jul 2008
Posts: 147
Default Wrong cache hit

Hi there,
I'm seeing a very unexpected and unknown act by Litespeed cache feature

Here is my cache Policy config:
Code:
  <cache>
    <storage>
      <cacheStorePath>/dev/shm/lswscache</cacheStorePath>
      <maxCacheObjSize>102400</maxCacheObjSize>
    </storage>
    <cachePolicy>
      <enableCache>0</enableCache>
      <expireInSeconds></expireInSeconds>
      <qsCache>1</qsCache>
      <reqCookieCache>1</reqCookieCache>
      <respCookieCache>1</respCookieCache>
      <ignoreReqCacheCtrl>1</ignoreReqCacheCtrl>
      <ignoreRespCacheCtrl>1</ignoreRespCacheCtrl>
    </cachePolicy>
  </cache>
here is my full htaccess with cache-control rewrite rule:
Code:
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.(jpg|gif|jpeg|png|css|ico|js|swf|zip|rar|mp3|exe) [NC]
RewriteRule . /index.php [L,E=Cache-Control:max-age=900]
</IfModule>
This is a big wordpress which I've enabled cache for its contents
They're using SEO plugin and urls are in this format:

/year/month/day/title/

While most of links are cached and fetched properly sometimes a few urls are fetching wrong content instead
for example /2011/06/09/title1 returns the content of another post, /2011/06/09/title2

It returns wrong content for all requests for that url till pruning cache dir while the other cached contents are working properly

I'm using Cache feature on many servers with the same rules for WP, all of them are working like a charm but this one

Please note that its not occurring for WP only, there are other CMS such as PHPNuke which the same issue is happening with SEO rewrited urls, and the most unexpected thing is that they're fetching the contents from each other websites!
The only matching thing between these URLs is that they're non-existing files SEO rewrite rules, but not the same cond/rules

Seems there is a problem while saving the item to the cache to me

PS: All 4.1x versions are affected

Any idea is welcome

Thanks
Reply With Quote
  #2  
Old 06-13-2011, 03:34 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
does it happen randomly? or persistently?
can it be reliably reproduced, like when it happened, /2011/06/09/title1 always return content of returns the content of /2011/06/09/title2? or, next time, just change to something else?

We need to somehow reproduce it in our lab in order to get it fixed.
Reply With Quote
  #3  
Old 06-28-2011, 09:36 AM
IrPr IrPr is offline
Senior Member
 
Join Date: Jul 2008
Posts: 147
Dear George,

Its happening very rarely and random, but when it occurs for one of cached contents it returns another cached object (just the same, not jumpy) until pruning cache directory

I've experienced this issue on another busy server with big sites and lots of cached contents and very high hit rate

Indeed its happening for the sites with the highest cached content and hit rate
The CMS is not similar, the only resemblance is both websites are under heavy cache hit

It seems to my customers that server/website is hacked, however it occurs very rarely

Please let me know if any further information is needed
Reply With Quote
  #4  
Old 06-28-2011, 07:25 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I think it might be due to hash collisions. We will add more code to handle this situation.
And we will improve the hash function for the page cache indexes to reduce collisions, will let you know when it is ready.
Reply With Quote
  #5  
Old 06-29-2011, 01:44 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Please download and try 4.1.2 build, just change version number in the download link to get it.
Reply With Quote
  #6  
Old 07-05-2011, 01:02 PM
IrPr IrPr is offline
Senior Member
 
Join Date: Jul 2008
Posts: 147
Quote:
Originally Posted by mistwang View Post
Please download and try 4.1.2 build, just change version number in the download link to get it.
I've just installed 4.1.2 and see
but now directory listing is broken even with Options Indexes in htaccess and httpd.conf

would you please take a look into this also?
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 02:41 PM.



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