Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cache:litemage:troubleshooting:sometimes-hit-sometimes-miss [2017/05/05 17:45]
Jackson Zhang
litespeed_wiki:cache:litemage:troubleshooting:sometimes-hit-sometimes-miss [2017/05/08 14:12] (current)
Jackson Zhang [Storage Cleanup]
Line 1: Line 1:
-===== My homepage sometimes cache miss and sometimes cache hit ===== +~~NOTOC~~ 
-When you initially setup LiteMage ​and get everything right, you should see X-Litespeed-Cache:​miss” for the first time visit page, then if you refresh ​the page, you should see X-LiteSpeed-Cache:​ hit,​litemage”. All visitors should see cache hit for that URL. +===== What Causes a Cache Miss? ===== 
- +====New Installation==== 
-How about if I have many URLs and want all pages served from cache instead of cache miss? You can setup [[litespeed_wiki:​cache:​lite image:​troubleshooting:​warmup|crawler to warm-up the cache]] for your store. ​ After warm up, all URLs should be served from cache.  +When you initially setup LiteMage, if it is configured correctly, you should see **X-Litespeed-Cache:​miss** the first time you visit your homepage. This is normal behavior. That first page load is what populates ​the cache, and for every reload after that, you (and your visitors) ​should see **X-LiteSpeed-Cache:​ hit,​litemage**.
- +
-But I may still see cache miss sometime later, which possibly because cache expired through "​public TTL" and Magento will need to run warm up again. ​ On the other hand, you don't want the warmup running at the back end all time since it will use CPU resources and push server load to be higher. If warmup running time = X, you can set Warmup interval = 3X, public TTL = 4X. +
- +
-There could be another reason that if you have set to clean cache storage directory regularly, you will see cache miss after cache files being removed.+
  
 +What if you have many URLs and want //all// of the pages served from cache the first time a visitor loads them? You can set up the crawler to [[litespeed_wiki:​cache:​litemage:​troubleshooting:​warmup|warm up the cache]] for your store. ​ After a warm up, all URLs will be served from cache. ​
  
 +====Expired Cache====
 +You may occasionally see a cache miss after your store has been running a while. This can be due to cache that has expired through public TTL. If you want to avoid cache misses like this, Magento will need to run the warm up on a regular basis. On the other hand, you don't want the warm up running at the back end //all// of the time, because it will use CPU resources and push the server load higher. Follow this rule of thumb to keep the cache fresh while minimizing server load impact: If warm up running time = X, set warm up interval = 3X and public TTL = 4X.
  
 +====Storage Cleanup====
 +If you have your system set to clean up the cache storage directory regularly, you will see a cache miss after the directory files have been removed. Normally there is no need to remove files under the cache root manually, the server will remove expired entries automatically.
  
 +==== Hit cache object limit ====
 +For a large store, it may hit your LiteMage license limit, such as 1500 objects for starter plan, you should upgrade your litemage to a higher plan.
  • Admin
  • Last modified: 2017/05/05 17:45
  • by Jackson Zhang