LiteSpeed_LiteMage - Version 1.3.0

Version Notes

Major feature improvement: Improved first page load speed for new visitors. This feature requires LiteSpeed Web Server 5.1.10 or LiteSpeed Load Balancer 2.0.1
New feature: allow separate cache copies for each defined user group.
New feature: allow crawlers to warm a copy of the site for logged in users.
Improved generation of site urls.
Bug fix: Fixed a bug caused when ESI blocks have child blocks with special layout handles.

Download this release

Release Info

Developer LiteSpeed Technologies
Extension LiteSpeed_LiteMage
Version 1.3.0
Comparing to
See all releases


Code changes from version 1.2.3 to 1.3.0

app/code/community/Litespeed/Litemage/Helper/Data.php CHANGED
@@ -32,6 +32,7 @@ class Litespeed_Litemage_Helper_Data extends Mage_Core_Helper_Abstract
32
  const STOREXML_HOMETTL = 'litemage/general/home_ttl' ;
33
  const STOREXML_TRACKLASTVIEWED = 'litemage/general/track_viewed' ;
34
  const STOREXML_DIFFCUSTGRP = 'litemage/general/diff_customergroup' ;
 
35
  const STOREXML_WARMUP_ENABLED = 'litemage/warmup/enable_warmup' ;
36
  const STOREXML_FPWP_ENABLED = 'litemage/fishpigwp/fpwp_cache';
37
  const STOREXML_FPWP_TTL = 'litemage/fishpigwp/fpwp_ttl';
@@ -46,6 +47,7 @@ class Litespeed_Litemage_Helper_Data extends Mage_Core_Helper_Abstract
46
  const CFG_AUTOCOLLECT = 'collect' ;
47
  const CFG_TRACKLASTVIEWED = 'track_viewed' ;
48
  const CFG_DIFFCUSTGRP = 'diff_customergroup' ;
 
49
  const CFG_PUBLICTTL = 'public_ttl' ;
50
  const CFG_PRIVATETTL = 'private_ttl' ;
51
  const CFG_HOMETTL = 'home_ttl' ;
@@ -371,6 +373,85 @@ class Litespeed_Litemage_Helper_Data extends Mage_Core_Helper_Abstract
371
  return $this->_conf[self::CFG_AUTOCOLLECT][$storeId] ;
372
  }
373
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
  protected function _getStoreWarmUpInfo( $storeId, $vary_dev )
375
  {
376
  $storeInfo = array() ;
@@ -420,19 +501,8 @@ class Litespeed_Litemage_Helper_Data extends Mage_Core_Helper_Abstract
420
  }
421
  }
422
 
423
- $vary_cgrp = '' ;
424
- /* if ( $diffGrp = Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP, $storeId)) ) {
425
- // $crawlgrp = 'out' ;
426
- $crawlUsers = array(138, 137);
427
- if ($crawlUsers) {
428
- if ($diffGrp == 2) {
429
- // for in & out
430
- $crawlgrp .= ',in_138';
431
- }
432
- * '/vary_cgrp/' . $vary_customergroup ;
433
- }
434
- //} */
435
-
436
  $env = '' ;
437
 
438
  $storeName = $store->getName() ;
@@ -607,20 +677,25 @@ class Litespeed_Litemage_Helper_Data extends Mage_Core_Helper_Abstract
607
  }
608
 
609
  // get store override, because store id may change after init
610
- if ( $name == self::CFG_DIFFCUSTGRP ) {
611
- $this->_conf[self::CFG_DIFFCUSTGRP] = Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP) ;
612
- }
613
- elseif ( $name == self::CFG_PUBLICTTL ) {
614
- $this->_conf[self::CFG_PUBLICTTL] = Mage::getStoreConfig(self::STOREXML_PUBLICTTL) ;
615
- }
616
- elseif ( $name == self::CFG_PRIVATETTL ) {
617
- $this->_conf[self::CFG_PRIVATETTL] = Mage::getStoreConfig(self::STOREXML_PRIVATETTL) ;
618
- }
619
- elseif ( $name == self::CFG_HOMETTL ) {
620
- $this->_conf[self::CFG_HOMETTL] = Mage::getStoreConfig(self::STOREXML_HOMETTL) ;
621
- }
622
- elseif ( $name == self::CFG_TRACKLASTVIEWED ) {
623
- $this->_conf[self::CFG_TRACKLASTVIEWED] = Mage::getStoreConfig(self::STOREXML_TRACKLASTVIEWED) ;
 
 
 
 
 
624
  }
625
 
626
  if ( $type == '' )
@@ -631,9 +706,39 @@ class Litespeed_Litemage_Helper_Data extends Mage_Core_Helper_Abstract
631
  return $this->_conf[$type][$name] ;
632
  }
633
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
634
  protected function _initConf( $type = '' )
635
  {
636
- $storeId = Mage::app()->getStore()->getId() ;
637
  if ( ! isset($this->_conf['defaultlm']) ) {
638
  $this->_conf['defaultlm'] = $this->_getConfigByPath(self::CFGXML_DEFAULTLM) ;
639
  }
@@ -742,8 +847,12 @@ class Litespeed_Litemage_Helper_Data extends Mage_Core_Helper_Abstract
742
  break ;
743
 
744
  // get store override
 
745
  $this->_conf[self::CFG_TRACKLASTVIEWED] = Mage::getStoreConfig(self::STOREXML_TRACKLASTVIEWED, $storeId) ;
746
  $this->_conf[self::CFG_DIFFCUSTGRP] = Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP, $storeId) ;
 
 
 
747
  $this->_conf[self::CFG_PUBLICTTL] = Mage::getStoreConfig(self::STOREXML_PUBLICTTL, $storeId) ;
748
  $this->_conf[self::CFG_PRIVATETTL] = Mage::getStoreConfig(self::STOREXML_PRIVATETTL, $storeId) ;
749
  $this->_conf[self::CFG_HOMETTL] = Mage::getStoreConfig(self::STOREXML_HOMETTL, $storeId) ;
32
  const STOREXML_HOMETTL = 'litemage/general/home_ttl' ;
33
  const STOREXML_TRACKLASTVIEWED = 'litemage/general/track_viewed' ;
34
  const STOREXML_DIFFCUSTGRP = 'litemage/general/diff_customergroup' ;
35
+ const STOREXML_DIFFCUSTGRP_SET = 'litemage/general/diff_customergroup_set' ;
36
  const STOREXML_WARMUP_ENABLED = 'litemage/warmup/enable_warmup' ;
37
  const STOREXML_FPWP_ENABLED = 'litemage/fishpigwp/fpwp_cache';
38
  const STOREXML_FPWP_TTL = 'litemage/fishpigwp/fpwp_ttl';
47
  const CFG_AUTOCOLLECT = 'collect' ;
48
  const CFG_TRACKLASTVIEWED = 'track_viewed' ;
49
  const CFG_DIFFCUSTGRP = 'diff_customergroup' ;
50
+ const CFG_DIFFCUSTGRP_SET = 'diff_customergroup_set' ;
51
  const CFG_PUBLICTTL = 'public_ttl' ;
52
  const CFG_PRIVATETTL = 'private_ttl' ;
53
  const CFG_HOMETTL = 'home_ttl' ;
373
  return $this->_conf[self::CFG_AUTOCOLLECT][$storeId] ;
374
  }
375
 
376
+ protected function _getStoreWarmUpCustGroupVary($store)
377
+ {
378
+ $storeId = $store->getId();
379
+ $customers = trim(Mage::getStoreConfig('litemage/warmup/multi_custgroup', $storeId));
380
+ if (!$customers)
381
+ return '';
382
+
383
+ $cids = array_unique(preg_split("/[\s,]+/", $customers, null, PREG_SPLIT_NO_EMPTY));
384
+ if (count($cids) == 0)
385
+ return '';
386
+
387
+ $vary_cgrp = '';
388
+ $customer = Mage::getModel('customer/customer')->setWebsiteId($store->getWebsiteId());
389
+
390
+ $diffGrp = Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP, $storeId);
391
+ if ($diffGrp == 1) {
392
+ // per group
393
+ $grps = array();
394
+ foreach ($cids as $cid) {
395
+ $customer->load($cid);
396
+ if ($customer->getId() == $cid) {
397
+ $gid = $customer->getGroupId();
398
+ if (!in_array($gid, $grps)) {
399
+ $grps[] = $gid;
400
+ $vary_cgrp .= ',' . $gid . '_' . $cid;
401
+ }
402
+ }
403
+ }
404
+ }
405
+ elseif ($diffGrp == 2) {
406
+ // for in & out
407
+ foreach ($cids as $cid) {
408
+ $customer->load($cid);
409
+ if ($customer->getId() == $cid) {
410
+ $vary_cgrp .= ',in_' . $cid;
411
+ break;
412
+ }
413
+ }
414
+ }
415
+ elseif ($diffGrp == 3) {
416
+ $rgids = $this->_parseCustGrpSets(Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP_SET, $storeId));
417
+ $grps = array();
418
+ $guestReview = Mage::helper('review')->getIsGuestAllowToWrite();
419
+ foreach ($cids as $cid) {
420
+ $customer->load($cid);
421
+ if ($customer->getId() == $cid) {
422
+ $gid = $customer->getGroupId();
423
+ if (isset($rgids[$gid])) {
424
+ if (!in_array($rgids[$gid], $grps)) {
425
+ $grps[] = $rgids[$gid];
426
+ $vary_cgrp .= ',' . $rgids[$gid] . '_' . $cid;
427
+ }
428
+ }
429
+ elseif (!$guestReview && !in_array('review', $grps)) {
430
+ $grps[] = 'review';
431
+ $vary_cgrp .= ',review_' . $cid;
432
+ }
433
+ }
434
+ }
435
+ }
436
+ elseif ($diffGrp == 0) {
437
+ $guestReview = Mage::helper('review')->getIsGuestAllowToWrite();
438
+ if (!$guestReview) {
439
+ foreach ($cids as $cid) {
440
+ $customer->load($cid);
441
+ if ($customer->getId() == $cid) {
442
+ $vary_cgrp .= ',review_' . $cid;
443
+ break;
444
+ }
445
+ }
446
+ }
447
+ }
448
+
449
+ if ($vary_cgrp) {
450
+ $vary_cgrp = '/vary_cgrp/-' . $vary_cgrp; // "-" means default, can also be review_userid
451
+ }
452
+ return $vary_cgrp;
453
+ }
454
+
455
  protected function _getStoreWarmUpInfo( $storeId, $vary_dev )
456
  {
457
  $storeInfo = array() ;
501
  }
502
  }
503
 
504
+ $vary_cgrp = $this->_getStoreWarmUpCustGroupVary($store);
505
+
 
 
 
 
 
 
 
 
 
 
 
506
  $env = '' ;
507
 
508
  $storeName = $store->getName() ;
677
  }
678
 
679
  // get store override, because store id may change after init
680
+ switch ($name) {
681
+ case self::CFG_DIFFCUSTGRP:
682
+ $this->_conf[self::CFG_DIFFCUSTGRP] = Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP) ;
683
+ break;
684
+ case self::CFG_DIFFCUSTGRP_SET:
685
+ $this->_conf[self::CFG_DIFFCUSTGRP_SET] = $this->_parseCustGrpSets(Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP_SET)) ;
686
+ break;
687
+ case self::CFG_PUBLICTTL:
688
+ $this->_conf[self::CFG_PUBLICTTL] = Mage::getStoreConfig(self::STOREXML_PUBLICTTL) ;
689
+ break;
690
+ case self::CFG_PRIVATETTL:
691
+ $this->_conf[self::CFG_PRIVATETTL] = Mage::getStoreConfig(self::STOREXML_PRIVATETTL) ;
692
+ break;
693
+ case self::CFG_HOMETTL:
694
+ $this->_conf[self::CFG_HOMETTL] = Mage::getStoreConfig(self::STOREXML_HOMETTL) ;
695
+ break;
696
+ case self::CFG_TRACKLASTVIEWED:
697
+ $this->_conf[self::CFG_TRACKLASTVIEWED] = Mage::getStoreConfig(self::STOREXML_TRACKLASTVIEWED) ;
698
+ break;
699
  }
700
 
701
  if ( $type == '' )
706
  return $this->_conf[$type][$name] ;
707
  }
708
 
709
+ protected function _parseCustGrpSets($groupings)
710
+ {
711
+ //return array of reversed gid -> groupings
712
+ $groupingids = array_unique(preg_split("/[\s,]+/", $groupings, null, PREG_SPLIT_NO_EMPTY)) ;
713
+ $rgids = array(); // reversed gid -> groupings (groupings convert : to .
714
+ foreach ($groupingids as $groupingid) {
715
+ if (strpos($groupingid, ':') !== false) {
716
+ $gids2 = explode(':', $groupingid);
717
+ $trgids = array();
718
+ foreach ($gids2 as $singlegid) {
719
+ $sgid = intval($singlegid);
720
+ if ((strval($sgid) == $singlegid) && ($sgid > 0))
721
+ $trgids[] = $sgid;
722
+ }
723
+ if (count($trgids)) {
724
+ sort($trgids);
725
+ $cleangroupid = implode('.', $trgids);
726
+ foreach ($trgids as $sgid) {
727
+ $rgids[$sgid] = $cleangroupid;
728
+ }
729
+ }
730
+ }
731
+ else {
732
+ $sgid = intval($groupingid);
733
+ if ((strval($sgid) == $groupingid) && ($sgid > 0))
734
+ $rgids[$sgid] = $groupingid;
735
+ }
736
+ }
737
+ return $rgids;
738
+ }
739
+
740
  protected function _initConf( $type = '' )
741
  {
 
742
  if ( ! isset($this->_conf['defaultlm']) ) {
743
  $this->_conf['defaultlm'] = $this->_getConfigByPath(self::CFGXML_DEFAULTLM) ;
744
  }
847
  break ;
848
 
849
  // get store override
850
+ $storeId = Mage::app()->getStore()->getId() ;
851
  $this->_conf[self::CFG_TRACKLASTVIEWED] = Mage::getStoreConfig(self::STOREXML_TRACKLASTVIEWED, $storeId) ;
852
  $this->_conf[self::CFG_DIFFCUSTGRP] = Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP, $storeId) ;
853
+ if ($this->_conf[self::CFG_DIFFCUSTGRP] == 3) {
854
+ $this->_conf[self::CFG_DIFFCUSTGRP_SET] = $this->_parseCustGrpSets(Mage::getStoreConfig(self::STOREXML_DIFFCUSTGRP_SET, $storeId)) ;
855
+ }
856
  $this->_conf[self::CFG_PUBLICTTL] = Mage::getStoreConfig(self::STOREXML_PUBLICTTL, $storeId) ;
857
  $this->_conf[self::CFG_PRIVATETTL] = Mage::getStoreConfig(self::STOREXML_PRIVATETTL, $storeId) ;
858
  $this->_conf[self::CFG_HOMETTL] = Mage::getStoreConfig(self::STOREXML_HOMETTL, $storeId) ;
app/code/community/Litespeed/Litemage/Helper/Esi.php CHANGED
@@ -604,7 +604,7 @@ class Litespeed_Litemage_Helper_Esi
604
 
605
  if ( ($this->_cacheVars['flag'] & self::CHBM_ESI_ON) != 0 ) {
606
  // no need to use comment, will be removed by minify extensions
607
- $combined = '<' . $esiIncludeTag . ' src="' . $this->_getSubReqUrl('litemage/esi/getCombined', $sharedParams) . '" combine="main" cache-control="no-cache"/>' ;
608
  if ($this->_isDebug) {
609
  $this->_config->debugMesg('_updateResponseBody combined is ' . $combined);
610
  }
@@ -1073,13 +1073,18 @@ class Litespeed_Litemage_Helper_Esi
1073
  $default['st'] = intval($currStoreId) ;
1074
  }
1075
  if ($diffGrp = $this->_config->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP)) {
1076
- // diff cache copy peer customer group
1077
  $currCustomerGroup = Mage::getSingleton('customer/session')->getCustomerGroupId() ;
1078
  if ( Mage_Customer_Model_Group::NOT_LOGGED_IN_ID != $currCustomerGroup ) {
1079
  if ($diffGrp == 1) // diff copy per group
1080
  $default['cgrp'] = $currCustomerGroup ;
1081
- else // diff copy for logged in user
1082
  $default['cgrp'] = 'in' ;
 
 
 
 
 
1083
  }
1084
  }
1085
  if ($this->_config->isRestrainedIP()) {
@@ -1125,8 +1130,13 @@ class Litespeed_Litemage_Helper_Esi
1125
  if ( Mage_Customer_Model_Group::NOT_LOGGED_IN_ID != $currCustomerGroup ) {
1126
  if ($diffGrp == 1) // diff copy per group
1127
  $urlParams['cg'] = $currCustomerGroup ;
1128
- else // diff copy for logged in user
1129
  $urlParams['cg'] = 'in' ;
 
 
 
 
 
1130
  }
1131
  }
1132
  // for public block, should consider vary on
604
 
605
  if ( ($this->_cacheVars['flag'] & self::CHBM_ESI_ON) != 0 ) {
606
  // no need to use comment, will be removed by minify extensions
607
+ $combined = '<' . $esiIncludeTag . ' src="' . $this->_getSubReqUrl('litemage/esi/getCombined', $sharedParams) . '" combine="main2" cache-control="no-cache"/>' ;
608
  if ($this->_isDebug) {
609
  $this->_config->debugMesg('_updateResponseBody combined is ' . $combined);
610
  }
1073
  $default['st'] = intval($currStoreId) ;
1074
  }
1075
  if ($diffGrp = $this->_config->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP)) {
1076
+ // diff cache copy per customer group
1077
  $currCustomerGroup = Mage::getSingleton('customer/session')->getCustomerGroupId() ;
1078
  if ( Mage_Customer_Model_Group::NOT_LOGGED_IN_ID != $currCustomerGroup ) {
1079
  if ($diffGrp == 1) // diff copy per group
1080
  $default['cgrp'] = $currCustomerGroup ;
1081
+ elseif ($diffGrp == 2) // diff copy for logged in user
1082
  $default['cgrp'] = 'in' ;
1083
+ elseif ($diffGrp == 3) {
1084
+ $cgset = $this->_config->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP_SET);
1085
+ if (isset($cgset[$currCustomerGroup]))
1086
+ $default['cgrp'] = $cgset[$currCustomerGroup];
1087
+ }
1088
  }
1089
  }
1090
  if ($this->_config->isRestrainedIP()) {
1130
  if ( Mage_Customer_Model_Group::NOT_LOGGED_IN_ID != $currCustomerGroup ) {
1131
  if ($diffGrp == 1) // diff copy per group
1132
  $urlParams['cg'] = $currCustomerGroup ;
1133
+ elseif ($diffGrp == 2) // diff copy for logged in user
1134
  $urlParams['cg'] = 'in' ;
1135
+ elseif ($diffGrp == 3) {
1136
+ $cgset = $this->_config->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP_SET);
1137
+ if (isset($cgset[$currCustomerGroup]))
1138
+ $urlParams['cg'] = $cgset[$currCustomerGroup];
1139
+ }
1140
  }
1141
  }
1142
  // for public block, should consider vary on
app/code/community/Litespeed/Litemage/Helper/Viewvary.php CHANGED
@@ -25,7 +25,6 @@
25
 
26
  class Litespeed_Litemage_Helper_Viewvary
27
  {
28
-
29
  protected $_vary = array( 'toolbar' => '_adjustToolbar', 'env' => '_setEnv', 'review' => '_checkReviewVary' ) ;
30
 
31
  public function persistViewVary( $tags )
@@ -59,16 +58,27 @@ class Litespeed_Litemage_Helper_Viewvary
59
  // only set if there's existing cookie
60
  if (!Mage::helper('review')->getIsGuestAllowToWrite()) {
61
  // only logged in allow to write review
62
- if (0 == Mage::helper('litemage/data')->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP)) {
 
 
63
  // no seperate copy per user group, so need to distinguish here
64
- $cookieName = '_lscache_vary_review' ;
65
- if (Mage::getSingleton('customer/session')->isLoggedIn()) {
66
- Mage::helper('litemage/esi')->addEnvVars($cookieName, 'write', '1') ;
67
- }
68
- else {
69
- Mage::helper('litemage/esi')->addEnvVars($cookieName) ;
 
 
70
  }
71
  }
 
 
 
 
 
 
 
72
  }
73
  }
74
  }
25
 
26
  class Litespeed_Litemage_Helper_Viewvary
27
  {
 
28
  protected $_vary = array( 'toolbar' => '_adjustToolbar', 'env' => '_setEnv', 'review' => '_checkReviewVary' ) ;
29
 
30
  public function persistViewVary( $tags )
58
  // only set if there's existing cookie
59
  if (!Mage::helper('review')->getIsGuestAllowToWrite()) {
60
  // only logged in allow to write review
61
+ $diffGrp = Mage::helper('litemage/data')->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP);
62
+ $addReviewVary = 0;
63
+ if (0 == $diffGrp) {
64
  // no seperate copy per user group, so need to distinguish here
65
+ $addReviewVary = Mage::getSingleton('customer/session')->isLoggedIn() ? 2 : 1;
66
+ }
67
+ elseif (3 == $diffGrp) {
68
+ $cgset = Mage::helper('litemage/data')->getConf(Litespeed_Litemage_Helper_Data::CFG_DIFFCUSTGRP_SET);
69
+ $currCustomerGroup = Mage::getSingleton('customer/session')->getCustomerGroupId() ;
70
+ if (!isset($cgset[$currCustomerGroup])) {
71
+ // mixed logged in group with non-logged-in
72
+ $addReviewVary = (Mage_Customer_Model_Group::NOT_LOGGED_IN_ID != $currCustomerGroup) ? 2 : 1;
73
  }
74
  }
75
+
76
+ if ($addReviewVary == 1) { // cookie only
77
+ Mage::helper('litemage/esi')->addEnvVars('_lscache_vary_review') ;
78
+ }
79
+ elseif ($addReviewVary == 2) { // cookie & value
80
+ Mage::helper('litemage/esi')->addEnvVars('_lscache_vary_review', 'write', '1') ;
81
+ }
82
  }
83
  }
84
  }
app/code/community/Litespeed/Litemage/Model/Config/Source/CustomerGroup.php CHANGED
@@ -29,6 +29,7 @@ class Litespeed_Litemage_Model_Config_Source_CustomerGroup {
29
  return array(
30
  array( 'value' => 1, 'label' => $helper->__( 'Yes' ) ),
31
  array( 'value' => 2, 'label' => $helper->__( 'Only distinguish between logged-in vs logged-out' ) ),
 
32
  array( 'value' => 0, 'label' => $helper->__( 'No' ) ),
33
  );
34
  }
29
  return array(
30
  array( 'value' => 1, 'label' => $helper->__( 'Yes' ) ),
31
  array( 'value' => 2, 'label' => $helper->__( 'Only distinguish between logged-in vs logged-out' ) ),
32
+ array( 'value' => 3, 'label' => $helper->__( 'Only distinguish between defined groupings vs logged-out' ) ),
33
  array( 'value' => 0, 'label' => $helper->__( 'No' ) ),
34
  );
35
  }
app/code/community/Litespeed/Litemage/Model/EsiData.php CHANGED
@@ -193,8 +193,6 @@ class Litespeed_Litemage_Model_EsiData
193
 
194
  protected function _initBlock($params, $configHelper)
195
  {
196
- $this->_initShared($params);
197
-
198
  if (!isset($params['t']) || !isset($params['bi'])) {
199
  $this->_exceptionOut('missing param t_bi');
200
  }
@@ -265,25 +263,12 @@ class Litespeed_Litemage_Model_EsiData
265
  {
266
  // ttl is 0, no cache
267
  if ( isset($params['product']) && isset($params['s']) ) {
268
- $this->_data = array('product' => $params['product'],
269
- 's' => $params['s']);
270
  $this->_batchId = self::BATCH_DIRECT;
271
  }
272
  // else exception out
273
  }
274
 
275
- protected function _initShared($params)
276
- {
277
- if ( ! isset($params['s']) || ! isset($params['dp']) || ! isset($params['dt']) ) {
278
- $this->_exceptionOut('missing s_dp_dt') ;
279
- }
280
- $this->_data = array(
281
- 's' => $params['s'],
282
- 'dp' => $params['dp'],
283
- 'dt' => $params['dt']
284
- );
285
- }
286
-
287
  public function getData()
288
  {
289
  return $this->_data;
@@ -291,7 +276,6 @@ class Litespeed_Litemage_Model_EsiData
291
 
292
  protected function _initCombined($params)
293
  {
294
- $this->_initShared($params);
295
  if ( empty($_REQUEST['esi_include']) ) {
296
  $this->_exceptionOut('missing esi_include');
297
  }
@@ -342,6 +326,22 @@ class Litespeed_Litemage_Model_EsiData
342
  }
343
  $dparams = $configHelper->decodeEsiUrlParams($param);
344
  $dparams['_layout_Id_'] = $url1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  return $dparams ;
346
  }
347
 
193
 
194
  protected function _initBlock($params, $configHelper)
195
  {
 
 
196
  if (!isset($params['t']) || !isset($params['bi'])) {
197
  $this->_exceptionOut('missing param t_bi');
198
  }
263
  {
264
  // ttl is 0, no cache
265
  if ( isset($params['product']) && isset($params['s']) ) {
266
+ $this->_data['product'] = $params['product'];
 
267
  $this->_batchId = self::BATCH_DIRECT;
268
  }
269
  // else exception out
270
  }
271
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  public function getData()
273
  {
274
  return $this->_data;
276
 
277
  protected function _initCombined($params)
278
  {
 
279
  if ( empty($_REQUEST['esi_include']) ) {
280
  $this->_exceptionOut('missing esi_include');
281
  }
326
  }
327
  $dparams = $configHelper->decodeEsiUrlParams($param);
328
  $dparams['_layout_Id_'] = $url1;
329
+
330
+ $this->_data = array();
331
+ if (isset($dparams['s']))
332
+ $this->_data['s'] = $dparams['s'];
333
+ if (isset($dparams['dp']))
334
+ $this->_data['dp'] = $dparams['dp'];
335
+ if (isset($dparams['dt']))
336
+ $this->_data['dt'] = $dparams['dt'];
337
+
338
+ if ($this->_action == self::ACTION_GET_COMBINED
339
+ || $this->_action == self::ACTION_GET_BLOCK
340
+ || $this->_action == self::ACTION_GET_MESSAGE) {
341
+ if ( ! isset($dparams['s']) || ! isset($dparams['dp']) || ! isset($dparams['dt']) ) {
342
+ $this->_exceptionOut('missing s_dp_dt') ;
343
+ }
344
+ }
345
  return $dparams ;
346
  }
347
 
app/code/community/Litespeed/Litemage/Model/Observer/Cron.php CHANGED
@@ -149,16 +149,16 @@ class Litespeed_Litemage_Model_Observer_Cron extends Varien_Event_Observer
149
  $disp['file'] = (isset($store_stat['file']) ? $store_stat['file'] : '') ;
150
  $disp['ttl'] = $store_stat['ttl'] ;
151
  $disp['interval'] = $store_stat['interval'] ;
152
- $disp['gentime'] = ($store_stat['gentime'] > 0) ? date($timefmt, $store_stat['gentime']) : ' ' ;
153
  $disp['tmpmsg'] = isset($store_stat['tmpmsg']) ? $store_stat['tmpmsg'] : '' ;
154
- $disp['endtime'] = ($store_stat['endtime'] > 0) ? date($timefmt, $store_stat['endtime']) : ' ' ;
155
  $disp['lastendtime'] = ($store_stat['lastendtime'] > 0) ? date($timefmt, $store_stat['lastendtime']) : ' ' ;
156
  $disp['listsize'] = ($store_stat['listsize'] > 0) ? $store_stat['listsize'] : 'N/A' ;
157
  $disp['curpos'] = $store_stat['curpos'] ;
158
  $disp['env'] = $store_stat['env'] ;
159
  $disp['curvary'] = preg_replace("/_lscache_vary=.+;/", '', $store_stat['curvary']) ;
160
  }
161
- $disp['lastquerytime'] = ($store_stat['lastquerytime'] > 0) ? date($timefmt, $store_stat['lastquerytime']) : ' ' ;
162
  $disp['queried'] = $store_stat['queried'] ;
163
  $priority[$listId] = $store_stat['priority'] ;
164
  $lists[$listId] = $disp ;
@@ -523,20 +523,34 @@ class Litespeed_Litemage_Model_Observer_Cron extends Varien_Event_Observer
523
  }
524
 
525
  foreach ( $multiCgrp as $cgrp ) {
 
 
 
 
526
  if ( $cgrp != '-' ) {
527
- // need to set user id
528
- $lsvary1['cgrp'] = $cgrp ;
 
 
 
 
 
 
 
 
 
 
529
  }
530
 
531
- if ( ! empty($lsvary1) ) {
532
- ksort($lsvary1) ;
533
- $lsvary1_val = '' ;
534
- foreach ( $lsvary1 as $k => $v ) {
535
- $lsvary1_val .= $k . '%7E' . urlencode($v) . '%7E' ; // %7E is "~"
536
  }
537
- $cookie_vary .= self::ENV_COOKIE_NAME . '=' . $lsvary1_val . ';' ;
538
  }
539
- $vary[] = $cookie_vary ; // can be empty string for default no vary
540
  }
541
  }
542
  }
@@ -1046,66 +1060,72 @@ class Litespeed_Litemage_Model_Observer_Cron extends Varien_Event_Observer
1046
  $basen = strlen($baseUrl) ;
1047
 
1048
  $urls = array( '' ) ; // first line is empty for base url
 
1049
 
1050
- $visibility = array(
 
1051
  Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
1052
- Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG,
1053
- ) ;
1054
  $catModel = Mage::getModel('catalog/category') ;
1055
 
1056
  $activeCat = $catModel->getCollection($storeId)->addIsActiveFilter() ;
1057
 
1058
  $produrls = array() ;
1059
-
1060
  // url with cat in path
1061
  foreach ( $activeCat as $cat ) {
1062
- $caturl = $cat->getUrl() ;
1063
- if ( strncasecmp($baseUrl, $caturl, $basen) == 0 ) {
1064
- $urls[] = substr($caturl, $basen) ;
1065
- }
1066
- foreach ( $cat->getProductCollection($storeId)
1067
- ->addUrlRewrite($cat->getId())
1068
- ->addAttributeToFilter('visibility', $visibility)
1069
- as $prod ) {
 
 
 
 
 
 
 
1070
  $produrl = $prod->getProductUrl() ;
1071
  if ( strncasecmp($baseUrl, $produrl, $basen) == 0 ) {
1072
  $produrls[] = substr($produrl, $basen) ;
1073
  }
1074
  }
1075
  }
 
1076
 
1077
- // url with no cat info
1078
- foreach ( $activeCat as $cat ) {
1079
- foreach ( $cat->getProductCollection($storeId)
1080
- ->addAttributeToFilter('visibility', $visibility)
1081
- as $prod ) {
1082
- $produrl = $prod->getProductUrl() ;
1083
- if ( strncasecmp($baseUrl, $produrl, $basen) == 0 ) {
1084
- $produrls[] = substr($produrl, $basen) ;
1085
- }
1086
  }
1087
  }
 
1088
 
1089
- $sitemap = 'sitemap/cms_page' ;
1090
  $sitemap = (Mage::getConfig()->getNode('modules/MageWorx_XSitemap') !== false) ?
1091
  'xsitemap/cms_page' : 'sitemap/cms_page' ;
1092
 
1093
- $sitemodel = Mage::getResourceModel($sitemap) ;
1094
- if ( $sitemodel != null ) {
1095
  foreach ( $sitemodel->getCollection($storeId) as $item ) {
1096
- $sitemapurl = $item->getUrl() ;
1097
- $urls[] = $sitemapurl ;
1098
  }
1099
  }
1100
 
1101
- $produrls = array_unique($produrls) ;
1102
  $urls = array_merge($urls, $produrls) ;
1103
 
1104
  $this->_saveCrawlListFileData($listId, $urls) ;
1105
 
1106
  return $urls ;
1107
  }
1108
-
1109
  protected function _generateCustUrlList( $listId )
1110
  {
1111
  $baseUrl = $this->_meta[$listId]['baseurl'] ;
149
  $disp['file'] = (isset($store_stat['file']) ? $store_stat['file'] : '') ;
150
  $disp['ttl'] = $store_stat['ttl'] ;
151
  $disp['interval'] = $store_stat['interval'] ;
152
+ $disp['gentime'] = ($store_stat['gentime'] > 0) ? date($timefmt, $store_stat['gentime']) : 'N/A' ;
153
  $disp['tmpmsg'] = isset($store_stat['tmpmsg']) ? $store_stat['tmpmsg'] : '' ;
154
+ $disp['endtime'] = ($store_stat['endtime'] > 0) ? date($timefmt, $store_stat['endtime']) : (($store_stat['gentime'] > 0) ? 'Not finished' : ' ') ;
155
  $disp['lastendtime'] = ($store_stat['lastendtime'] > 0) ? date($timefmt, $store_stat['lastendtime']) : ' ' ;
156
  $disp['listsize'] = ($store_stat['listsize'] > 0) ? $store_stat['listsize'] : 'N/A' ;
157
  $disp['curpos'] = $store_stat['curpos'] ;
158
  $disp['env'] = $store_stat['env'] ;
159
  $disp['curvary'] = preg_replace("/_lscache_vary=.+;/", '', $store_stat['curvary']) ;
160
  }
161
+ $disp['lastquerytime'] = ($store_stat['lastquerytime'] > 0) ? date($timefmt, $store_stat['lastquerytime']) : 'N/A' ;
162
  $disp['queried'] = $store_stat['queried'] ;
163
  $priority[$listId] = $store_stat['priority'] ;
164
  $lists[$listId] = $disp ;
523
  }
524
 
525
  foreach ( $multiCgrp as $cgrp ) {
526
+
527
+ $cookie_vary2 = $cookie_vary;
528
+ $lsvary2 = $lsvary1;
529
+
530
  if ( $cgrp != '-' ) {
531
+ // need to set user id, group_userid
532
+ if ($pos = strpos($cgrp, '_')) {
533
+ $group = substr($cgrp, 0, $pos);
534
+ $customerId = substr($cgrp, $pos+1);
535
+ if ($group == 'review') {
536
+ $cookie_vary2 .= '_lscache_vary_review=write%7E1%7E;' ;
537
+ }
538
+ else {
539
+ $lsvary2['cgrp'] = $group ;
540
+ }
541
+ $cookie_vary2 .= 'lmcron_customer=' . $customerId . ';' ;
542
+ }
543
  }
544
 
545
+ if ( ! empty($lsvary2) ) {
546
+ ksort($lsvary2) ;
547
+ $lsvary2_val = '' ;
548
+ foreach ( $lsvary2 as $k => $v ) {
549
+ $lsvary2_val .= $k . '%7E' . urlencode($v) . '%7E' ; // %7E is "~"
550
  }
551
+ $cookie_vary2 .= self::ENV_COOKIE_NAME . '=' . $lsvary2_val . ';' ;
552
  }
553
+ $vary[] = $cookie_vary2 ; // can be empty string for default no vary
554
  }
555
  }
556
  }
1060
  $basen = strlen($baseUrl) ;
1061
 
1062
  $urls = array( '' ) ; // first line is empty for base url
1063
+ $rootCatId = $store->getRootCategoryId();
1064
 
1065
+ $visibleAll = array('neq' => Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE);
1066
+ $visibility = array('in'=> array(
1067
  Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
1068
+ Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG)) ;
1069
+ $status = array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
1070
  $catModel = Mage::getModel('catalog/category') ;
1071
 
1072
  $activeCat = $catModel->getCollection($storeId)->addIsActiveFilter() ;
1073
 
1074
  $produrls = array() ;
 
1075
  // url with cat in path
1076
  foreach ( $activeCat as $cat ) {
1077
+ $cid = $cat->getId();
1078
+ if ($cid == $rootCatId) {
1079
+ continue;
1080
+ }
1081
+ else {
1082
+ $caturl = $cat->getUrl() ;
1083
+ if ( strncasecmp($baseUrl, $caturl, $basen) == 0 ) {
1084
+ $urls[] = substr($caturl, $basen) ;
1085
+ }
1086
+ $prods = $cat->getProductCollection($storeId)
1087
+ ->addUrlRewrite($cid)
1088
+ ->addAttributeToFilter('visibility', $visibility)
1089
+ ->addAttributeToFilter('status', $status);
1090
+ }
1091
+ foreach ($prods as $prod ) {
1092
  $produrl = $prod->getProductUrl() ;
1093
  if ( strncasecmp($baseUrl, $produrl, $basen) == 0 ) {
1094
  $produrls[] = substr($produrl, $basen) ;
1095
  }
1096
  }
1097
  }
1098
+ $produrls = array_unique($produrls) ;
1099
 
1100
+ $collection = Mage::getResourceModel('catalog/product_collection');
1101
+ $collection->addStoreFilter($storeId)
1102
+ ->addAttributeToFilter('visibility', $visibleAll)
1103
+ ->addAttributeToFilter('status', $status);
1104
+ $prods = $collection->load();
1105
+ foreach ($prods as $prod) {
1106
+ $produrl = $prod->getProductUrl() ;
1107
+ if ( strncasecmp($baseUrl, $produrl, $basen) == 0 ) {
1108
+ $produrls[] = substr($produrl, $basen) ;
1109
  }
1110
  }
1111
+ $produrls = array_unique($produrls) ;
1112
 
 
1113
  $sitemap = (Mage::getConfig()->getNode('modules/MageWorx_XSitemap') !== false) ?
1114
  'xsitemap/cms_page' : 'sitemap/cms_page' ;
1115
 
1116
+ if (($sitemodel = Mage::getResourceModel($sitemap)) != null) {
 
1117
  foreach ( $sitemodel->getCollection($storeId) as $item ) {
1118
+ $urls[] = $item->getUrl() ;
 
1119
  }
1120
  }
1121
 
 
1122
  $urls = array_merge($urls, $produrls) ;
1123
 
1124
  $this->_saveCrawlListFileData($listId, $urls) ;
1125
 
1126
  return $urls ;
1127
  }
1128
+
1129
  protected function _generateCustUrlList( $listId )
1130
  {
1131
  $baseUrl = $this->_meta[$listId]['baseurl'] ;
app/code/community/Litespeed/Litemage/Model/Observer/Esi.php CHANGED
@@ -107,6 +107,13 @@ class Litespeed_Litemage_Model_Observer_Esi extends Varien_Event_Observer
107
  $curActionName = $controller->getFullActionName() ;
108
  $reqUrl = $req->getRequestString() ;
109
  $session = Mage::getSingleton('core/session');
 
 
 
 
 
 
 
110
  $lmuser = $session->getData('_litemage_user');
111
  if ($lmuser == null) {
112
  $session->setData('_litemage_user', 1); // new visitor
@@ -207,11 +214,17 @@ class Litespeed_Litemage_Model_Observer_Esi extends Varien_Event_Observer
207
 
208
  $internalData = array( 'url' => $fullUrl);
209
 
210
- if ( $cron = Mage::getSingleton('core/cookie')->get('litemage_cron') ) {
 
211
  $internalData['cron'] = $cron;
212
- $currency = Mage::getSingleton('core/cookie')->get('currency');
213
- if ($currency != '')
214
  Mage::app()->getStore()->setCurrentCurrencyCode($currency);
 
 
 
 
 
 
215
  }
216
  $this->_helper->setInternal($internalData);
217
 
@@ -438,11 +451,13 @@ class Litespeed_Litemage_Model_Observer_Esi extends Varien_Event_Observer
438
  public function initNewVisitor($eventObj)
439
  {
440
  if ( $this->_moduleEnabledForUser ) {
441
- if (Mage::registry('LITEMAGE_NEWVISITOR')) {
442
- Mage::unregister('LITEMAGE_NEWVISITOR'); // to be safe
 
 
443
  }
444
  else {
445
- Mage::register('LITEMAGE_NEWVISITOR', 1);
446
  }
447
  }
448
  }
107
  $curActionName = $controller->getFullActionName() ;
108
  $reqUrl = $req->getRequestString() ;
109
  $session = Mage::getSingleton('core/session');
110
+
111
+ if (!isset($_COOKIE['frontend']) && isset($_COOKIE['litemage_key'])) {
112
+ //restore formkey
113
+ $session->setData('_form_key', $_COOKIE['litemage_key']); // new visitor
114
+ setcookie('litemage_key', '', time()-1000);
115
+ }
116
+
117
  $lmuser = $session->getData('_litemage_user');
118
  if ($lmuser == null) {
119
  $session->setData('_litemage_user', 1); // new visitor
214
 
215
  $internalData = array( 'url' => $fullUrl);
216
 
217
+ $cookie = Mage::getSingleton('core/cookie');
218
+ if ( $cron = $cookie->get('litemage_cron') ) {
219
  $internalData['cron'] = $cron;
220
+ if ( ($currency = $cookie->get('currency')) != '') {
 
221
  Mage::app()->getStore()->setCurrentCurrencyCode($currency);
222
+ }
223
+ if ( ($customerId = $cookie->get('lmcron_customer')) != '') {
224
+ $cs = Mage::getSingleton('customer/session');
225
+ $cs->setId($customerId);
226
+ $cs->setCustomerId($customerId);
227
+ }
228
  }
229
  $this->_helper->setInternal($internalData);
230
 
451
  public function initNewVisitor($eventObj)
452
  {
453
  if ( $this->_moduleEnabledForUser ) {
454
+ if ($value = Mage::registry('LITEMAGE_NEWVISITOR')) {
455
+ if ($value != 1) {// 1 is by preprocessor ok
456
+ Mage::unregister('LITEMAGE_NEWVISITOR'); // to be safe
457
+ }
458
  }
459
  else {
460
+ Mage::register('LITEMAGE_NEWVISITOR', 2);
461
  }
462
  }
463
  }
app/code/community/Litespeed/Litemage/Model/Observer/Purge.php CHANGED
@@ -96,7 +96,7 @@ class Litespeed_Litemage_Model_Observer_Purge extends Varien_Event_Observer
96
  }
97
  }
98
  }
99
-
100
  public function adminConfigChangedSection( $eventObj )
101
  {
102
  $config = Mage::helper('litemage/data') ;
@@ -104,7 +104,7 @@ class Litespeed_Litemage_Model_Observer_Purge extends Varien_Event_Observer
104
  $serverEnabled = $config->licenseEnabled();
105
  $adminSession = $this->_getAdminSession() ;
106
  if ( ! $serverEnabled ) {
107
- $adminSession()->addError($config->__('Your installation of LiteSpeed Web Server does not have LiteMage Cache enabled. Please make sure your LiteSpeed license includes the LiteMage cache module, and LiteMage is turned on in the .htaccess file in the root directory of your Magento installation.')) ;
108
  }
109
  if ( $moduleEnabled ) {
110
  if ( $serverEnabled ) {
96
  }
97
  }
98
  }
99
+
100
  public function adminConfigChangedSection( $eventObj )
101
  {
102
  $config = Mage::helper('litemage/data') ;
104
  $serverEnabled = $config->licenseEnabled();
105
  $adminSession = $this->_getAdminSession() ;
106
  if ( ! $serverEnabled ) {
107
+ $adminSession->addError($config->__('Your installation of LiteSpeed Web Server does not have LiteMage Cache enabled. Please make sure your LiteSpeed license includes the LiteMage cache module, and LiteMage is turned on in the .htaccess file in the root directory of your Magento installation.')) ;
108
  }
109
  if ( $moduleEnabled ) {
110
  if ( $serverEnabled ) {
app/code/community/Litespeed/Litemage/controllers/EsiController.php CHANGED
@@ -26,7 +26,6 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
26
  {
27
 
28
  const ESICACHE_ID = 'litemage_esi_data' ;
29
- const ESICACHE_ENTRYONLY = '__' ;
30
 
31
  protected $_processed = array() ;
32
  protected $_scheduled = array() ;
@@ -35,7 +34,7 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
35
  protected $_config ;
36
  protected $_isDebug ;
37
  protected $_layout ;
38
- protected $_env = array( 'shared' => false, 'fetch_all' => false ) ;
39
 
40
  // defaultHandles, cache_id, cache_updated, layout_unique, translate_inline, inline_tag
41
 
@@ -133,7 +132,7 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
133
  {
134
  $this->_getSingle() ;
135
  }
136
-
137
  protected function _getSingle()
138
  {
139
  $esiUrl = $this->_setOriginalReq() ;
@@ -157,15 +156,19 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
157
 
158
  $esiIncludes = $_REQUEST['esi_include'] ;
159
 
160
- if ( $this->_isDebug ) {
161
- $this->_config->debugMesg('combined includes = ' . print_r($esiIncludes, true)) ;
162
- }
163
-
164
  if ( ($key = array_search('*', $esiIncludes)) !== false ) {
165
- $this->_env['fetch_all'] = true ;
166
  unset($esiIncludes[$key]) ;
167
  // need to add getformkey
168
- $esiIncludes = array_unique(array_merge($esiIncludes, array_keys($this->_esiCache))) ;
 
 
 
 
 
 
 
 
 
169
  }
170
 
171
  //add raw header here, to handle ajax exception
@@ -192,6 +195,19 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
192
  }
193
  try {
194
  $out = $block->toHtml() ;
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  if ( $this->_env['translate_inline'] ) {
196
  Mage::getSingleton('core/translate_inline')->processResponseBody($out) ;
197
  }
@@ -231,24 +247,6 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
231
  return $origEsiUrl ;
232
  }
233
 
234
- protected function _parseUrlParams( $esiUrl )
235
- {
236
- $esiUrl = urldecode($esiUrl) ;
237
- $pos = strpos($esiUrl, 'litemage/esi/') ;
238
- if ( $pos === false ) {
239
- Mage::throwException('LiteMage module invalid esi data ' . $esiUrl) ;
240
- }
241
- $buf = explode('/', substr($esiUrl, $pos + 13)) ;
242
- $c = count($buf) ;
243
- $param = array() ;
244
- $param['action'] = $buf[0] ;
245
- $param['url'] = $esiUrl ;
246
- for ( $i = 1 ; ($i + 1) < $c ; $i+=2 ) {
247
- $param[$buf[$i]] = $buf[$i + 1] ;
248
- }
249
- return $param ;
250
- }
251
-
252
  protected function _processIncoming( $esiUrls )
253
  {
254
  if ($this->_env['shared']) {
@@ -301,7 +299,6 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
301
  }
302
  $this->_helper->setCacheControlFlag($flag, $attr['ttl'], $tag) ;
303
 
304
-
305
  $this->getResponse()->setBody($esiData->getRawOutput()) ;
306
  }
307
 
@@ -344,8 +341,6 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
344
  }
345
  $this->getResponse()->setBody($body) ;
346
 
347
-
348
-
349
  if ( $this->_env['cache_updated'] && $this->_config->useInternalCache() ) {
350
  $this->_config->saveInternalCache(serialize($this->_esiCache), $this->_env['cache_id']) ;
351
  }
@@ -524,7 +519,8 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
524
  $d = $esiData->getData() ;
525
 
526
  $app = Mage::app() ;
527
- $app->setCurrentStore($app->getStore($d['s'])) ;
 
528
 
529
  if ( $action == Litespeed_Litemage_Model_EsiData::ACTION_LOG ) {
530
  return ; // only need to set store
@@ -577,10 +573,10 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
577
 
578
  $this->getLayout()->getUpdate()->setCachePrefix($unique) ;
579
  }
580
-
581
  protected function _getShared( $url )
582
  {
583
- if ( ! empty($this->_esiCache[$url]) && ($this->_esiCache[$url] != self::ESICACHE_ENTRYONLY) ) {
584
  return $this->_esiCache[$url] ;
585
  }
586
  return null ;
@@ -594,11 +590,12 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
594
  return -1 ;
595
  }
596
 
597
- $isEntryOnly = ($esiData->getAction() == Litespeed_Litemage_Model_EsiData::ACTION_GET_FORMKEY );
598
 
599
  if ( $this->_env['shared'] ) {
600
- if ( empty($this->_esiCache[$url]) ) {
601
- $this->_esiCache[$url] = $isEntryOnly ? self::ESICACHE_ENTRYONLY : $inlineHtml ;
 
602
  $this->_env['cache_updated'] = true ;
603
  return 2 ;
604
  }
@@ -607,13 +604,13 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
607
 
608
  if ( ! isset($this->_esiCache[$url]) ) {
609
  // insert if entry not exist
610
- $this->_esiCache[$url] = $isEntryOnly ? self::ESICACHE_ENTRYONLY : '' ;
611
  $this->_env['cache_updated'] = true ;
612
  return 1 ;
613
  }
614
 
615
  $html = $this->_esiCache[$url] ;
616
- if ( $html != '' && $html != self::ESICACHE_ENTRYONLY ) {
617
  // check if same as shared
618
  $raw = '">' . $esiData->getRawOutput() . '</' . $this->_env['inline_tag'] . '>' ;
619
  if ( strpos($html, $raw) ) {
@@ -623,5 +620,5 @@ class Litespeed_Litemage_EsiController extends Mage_Core_Controller_Front_Action
623
  }
624
  return 0 ;
625
  }
626
-
627
  }
26
  {
27
 
28
  const ESICACHE_ID = 'litemage_esi_data' ;
 
29
 
30
  protected $_processed = array() ;
31
  protected $_scheduled = array() ;
34
  protected $_config ;
35
  protected $_isDebug ;
36
  protected $_layout ;
37
+ protected $_env = array( 'shared' => false ) ;
38
 
39
  // defaultHandles, cache_id, cache_updated, layout_unique, translate_inline, inline_tag
40
 
132
  {
133
  $this->_getSingle() ;
134
  }
135
+
136
  protected function _getSingle()
137
  {
138
  $esiUrl = $this->_setOriginalReq() ;
156
 
157
  $esiIncludes = $_REQUEST['esi_include'] ;
158
 
 
 
 
 
159
  if ( ($key = array_search('*', $esiIncludes)) !== false ) {
 
160
  unset($esiIncludes[$key]) ;
161
  // need to add getformkey
162
+ $extraUrls = array_keys($this->_esiCache);
163
+ $esiIncludes = array_unique(array_merge($esiIncludes, $extraUrls)) ;
164
+ if ( $this->_isDebug ) {
165
+ $this->_config->debugMesg('combined includes * = ' . print_r($esiIncludes, true)) ;
166
+ }
167
+ }
168
+ else {
169
+ if ( $this->_isDebug ) {
170
+ $this->_config->debugMesg('combined includes = ' . print_r($esiIncludes, true)) ;
171
+ }
172
  }
173
 
174
  //add raw header here, to handle ajax exception
195
  }
196
  try {
197
  $out = $block->toHtml() ;
198
+ $tag = $esiData->getCacheAttribute('tag');
199
+ if ( $tag == 'E.cart' || $tag == 'E.toplinks') {
200
+ // remove /checkout/cart/delete uenc
201
+ ///checkout/cart/delete/id/588/form_key/UItDHAGUxKVcMKX0/uenc/aHR0cDovL21hZ2Vud..........v/
202
+ $rcount = 0;
203
+ $out1 = preg_replace('/(\/checkout\/cart\/delete\/id\/\d+\/form_key\/\w+\/)uenc\/[^\/]*\//', '$1', $out, -1, $rcount);
204
+ if ($rcount > 0) {
205
+ if ( $this->_isDebug ) {
206
+ $this->_config->debugMesg('removed ' . $rcount . ' uenc from cart delete url') ;
207
+ }
208
+ $out = $out1;
209
+ }
210
+ }
211
  if ( $this->_env['translate_inline'] ) {
212
  Mage::getSingleton('core/translate_inline')->processResponseBody($out) ;
213
  }
247
  return $origEsiUrl ;
248
  }
249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  protected function _processIncoming( $esiUrls )
251
  {
252
  if ($this->_env['shared']) {
299
  }
300
  $this->_helper->setCacheControlFlag($flag, $attr['ttl'], $tag) ;
301
 
 
302
  $this->getResponse()->setBody($esiData->getRawOutput()) ;
303
  }
304
 
341
  }
342
  $this->getResponse()->setBody($body) ;
343
 
 
 
344
  if ( $this->_env['cache_updated'] && $this->_config->useInternalCache() ) {
345
  $this->_config->saveInternalCache(serialize($this->_esiCache), $this->_env['cache_id']) ;
346
  }
519
  $d = $esiData->getData() ;
520
 
521
  $app = Mage::app() ;
522
+ $store = $app->getStore($d['s']);
523
+ $app->setCurrentStore($store) ;
524
 
525
  if ( $action == Litespeed_Litemage_Model_EsiData::ACTION_LOG ) {
526
  return ; // only need to set store
573
 
574
  $this->getLayout()->getUpdate()->setCachePrefix($unique) ;
575
  }
576
+
577
  protected function _getShared( $url )
578
  {
579
+ if ( ! empty($this->_esiCache[$url]) && (strpos($url, 'getFormKey') === false) ) {
580
  return $this->_esiCache[$url] ;
581
  }
582
  return null ;
590
  return -1 ;
591
  }
592
 
593
+ $isFormKey = ($esiData->getAction() == Litespeed_Litemage_Model_EsiData::ACTION_GET_FORMKEY );
594
 
595
  if ( $this->_env['shared'] ) {
596
+ if (!isset($this->_esiCache[$url])
597
+ || (!$isFormKey && ($this->_esiCache[$url] == ''))) {
598
+ $this->_esiCache[$url] = $isFormKey ? '' : $inlineHtml ;
599
  $this->_env['cache_updated'] = true ;
600
  return 2 ;
601
  }
604
 
605
  if ( ! isset($this->_esiCache[$url]) ) {
606
  // insert if entry not exist
607
+ $this->_esiCache[$url] = '' ;
608
  $this->_env['cache_updated'] = true ;
609
  return 1 ;
610
  }
611
 
612
  $html = $this->_esiCache[$url] ;
613
+ if ( $html != '' && !$isFormKey ) {
614
  // check if same as shared
615
  $raw = '">' . $esiData->getRawOutput() . '</' . $this->_env['inline_tag'] . '>' ;
616
  if ( strpos($html, $raw) ) {
620
  }
621
  return 0 ;
622
  }
623
+
624
  }
app/code/community/Litespeed/Litemage/etc/config.xml CHANGED
@@ -26,7 +26,7 @@
26
  <config>
27
  <modules>
28
  <Litespeed_Litemage>
29
- <version>1.2.3</version>
30
  </Litespeed_Litemage>
31
  </modules>
32
  <global>
@@ -466,6 +466,7 @@
466
  <home_ttl>28800</home_ttl>
467
  <track_viewed>0</track_viewed>
468
  <diff_customergroup>0</diff_customergroup>
 
469
  <flush_prodcat>0</flush_prodcat>
470
  <alt_esi_syntax>0</alt_esi_syntax>
471
  <cache_tag_prefix>M</cache_tag_prefix>
@@ -479,6 +480,7 @@
479
  <interval>21600</interval>
480
  <priority>100</priority>
481
  <multi_currency/>
 
482
  <autolist_interval>28800</autolist_interval>
483
  <autolist_priority>300</autolist_priority>
484
  <enable_autocollect>0</enable_autocollect>
26
  <config>
27
  <modules>
28
  <Litespeed_Litemage>
29
+ <version>1.3.0</version>
30
  </Litespeed_Litemage>
31
  </modules>
32
  <global>
466
  <home_ttl>28800</home_ttl>
467
  <track_viewed>0</track_viewed>
468
  <diff_customergroup>0</diff_customergroup>
469
+ <diff_customergroup_set/>
470
  <flush_prodcat>0</flush_prodcat>
471
  <alt_esi_syntax>0</alt_esi_syntax>
472
  <cache_tag_prefix>M</cache_tag_prefix>
480
  <interval>21600</interval>
481
  <priority>100</priority>
482
  <multi_currency/>
483
+ <multi_custgroup/>
484
  <autolist_interval>28800</autolist_interval>
485
  <autolist_priority>300</autolist_priority>
486
  <enable_autocollect>0</enable_autocollect>
app/code/community/Litespeed/Litemage/etc/system.xml CHANGED
@@ -27,7 +27,7 @@
27
  <config>
28
  <tabs>
29
  <Litespeed_Litemage translate="label">
30
- <label>LiteMage Cache 1.2.3</label>
31
  <sort_order>5000</sort_order>
32
  </Litespeed_Litemage>
33
  </tabs>
@@ -128,6 +128,18 @@
128
  <show_in_website>1</show_in_website>
129
  <show_in_store>1</show_in_store>
130
  </diff_customergroup>
 
 
 
 
 
 
 
 
 
 
 
 
131
  <flush_prodcat translate="label,comment">
132
  <label>Flush Product and Categories When Product Qty Changes</label>
133
  <comment>Selection depends on whether product page shows quantity and whether category pages hide or label out of stock products.</comment>
@@ -356,6 +368,15 @@
356
  <show_in_website>1</show_in_website>
357
  <show_in_store>1</show_in_store>
358
  </multi_currency>
 
 
 
 
 
 
 
 
 
359
  <custlist_note translate="label,comment">
360
  <label>Custom Defined URL List Files</label>
361
  <comment>You can supply your own URL list for each store view. To do this go to the “Current Configuration Scope” box and select a store.</comment>
27
  <config>
28
  <tabs>
29
  <Litespeed_Litemage translate="label">
30
+ <label>LiteMage Cache 1.3.0</label>
31
  <sort_order>5000</sort_order>
32
  </Litespeed_Litemage>
33
  </tabs>
128
  <show_in_website>1</show_in_website>
129
  <show_in_store>1</show_in_store>
130
  </diff_customergroup>
131
+ <diff_customergroup_set translate="label,comment">
132
+ <label>Define User Groups for Separate Cache Copies</label>
133
+ <comment>List the user group IDs that will have different cache copies vs logged-out users. For example, if user groups with IDs 3 and 4 have VIP view, a group with ID 6 has wholesale view, and all other user groups will have same view as logged-out users, you can input "3:4, 6". To specify multiple groups with the same view, use ":". Use "," or space to separate different groupings.</comment>
134
+ <frontend_type>text</frontend_type>
135
+ <sort_order>65</sort_order>
136
+ <show_in_default>1</show_in_default>
137
+ <show_in_website>1</show_in_website>
138
+ <show_in_store>1</show_in_store>
139
+ <depends>
140
+ <diff_customergroup>3</diff_customergroup>
141
+ </depends>
142
+ </diff_customergroup_set>
143
  <flush_prodcat translate="label,comment">
144
  <label>Flush Product and Categories When Product Qty Changes</label>
145
  <comment>Selection depends on whether product page shows quantity and whether category pages hide or label out of stock products.</comment>
368
  <show_in_website>1</show_in_website>
369
  <show_in_store>1</show_in_store>
370
  </multi_currency>
371
+ <multi_custgroup translate="label,comment">
372
+ <label>Crawl on Behalf of Logged-in Users</label>
373
+ <comment>Warm up pages for logged-in user representatives. Space, comma separated list of user IDs from representative groups. For example, the user with ID 135 is from the VIP group and "Separate Cache Copy Per Customer Group" is set for the VIP group. In this case, you can list user 135 to warm the VIP user version of the site. If user 138 is in the General group and only logged-in users can write reviews and the General group is not in separate cache copy group, you can add 138, like "135, 138".</comment>
374
+ <frontend_type>text</frontend_type>
375
+ <sort_order>75</sort_order>
376
+ <show_in_default>1</show_in_default>
377
+ <show_in_website>1</show_in_website>
378
+ <show_in_store>1</show_in_store>
379
+ </multi_custgroup>
380
  <custlist_note translate="label,comment">
381
  <label>Custom Defined URL List Files</label>
382
  <comment>You can supply your own URL list for each store view. To do this go to the “Current Configuration Scope” box and select a store.</comment>
app/design/adminhtml/default/default/template/litemage/cache_management.phtml CHANGED
@@ -52,11 +52,12 @@ if ($stats = $this->getCacheStatistics()) {
52
  . ' <br>' . $lmhelper->__('Private Cache Hits'); ?></th>
53
  <th class="no-link a-right"><?php echo $lmhelper->__('Full Page Hits')
54
  . '<br>' . $lmhelper->__('Partial Page Hits'); ?></th>
55
- <th class="no-link a-right"><?php echo $lmhelper->__('LiteMage Cached Objects') . '<br>' . $lmhelper->__('Limited by Plan'); ?></th>
56
  </tr>
57
  <?php
58
  //$buf = (($i % 2) == 0) ? '<tr class="even">' : '<tr>';
59
- $buf = '<tr class="even"><td class="a-center">' . $stats['plan'] . '<br>(' . $stats['plan_desc']
 
60
  . ') <div class="a-right field-tooltip"><div>Available Plans:<hr>LiteMage Starter (1,500 publicly cached objects)<br>LiteMage Standard (25,000 publicly cached objects)<br>LiteMage Unlimited</div></div></td>'
61
  . '<td class="a-right">' . $stats['PUB_HITS']
62
  . ' <div class="a-left field-tooltip"><div>Number of requests that hit public cache since last flush all</div></div><br>'
@@ -68,8 +69,8 @@ if ($stats = $this->getCacheStatistics()) {
68
  . ' <div class="a-left field-tooltip"><div>Number of requests partially served from cache (some data retrieved from Magento) since last flush all</div></div></td>'
69
  . '<td class="a-right">' . $stats['LITEMAGE_OBJS']
70
  . ' <div class="a-left field-tooltip"><div>Current LiteMage cached object count</div></div><br>'
71
- . $stats['LITEMAGE_LIMITED']
72
- . ' <div class="a-left field-tooltip"><div>Number of requests not served from cache due to plan limitation</div></div></td>'
73
  . "</tr>\n";
74
  echo $buf;
75
 
@@ -140,7 +141,13 @@ if ($status = $this->getCrawlerStatus()) : ?>
140
  <tr>
141
  <td><h3><?php echo $lmhelper->__('LiteMage Crawler Warm-up Status') ?> <button type="submit" class="scalable"><span><?php echo $lmhelper->__('Refresh') ?></span></button></h3></td>
142
  </tr>
143
- <tr><td class="scope-label"><?php echo $lmhelper->__('You can click Reset All / Reset links below to restart a crawler queue.') ?></td></tr>
 
 
 
 
 
 
144
  </table>
145
  </div>
146
  </form>
@@ -155,7 +162,7 @@ if ($status = $this->getCrawlerStatus()) : ?>
155
  . '<br>' . $lmhelper->__('Public TTL (secs)'); ?>
156
  </th>
157
  <th class="no-link a-center"><?php echo $lmhelper->__('Last Round Finish Time') . '<br>' . $lmhelper->__('Generate Time | Finish Time') . '<br>' . $lmhelper->__('Last Query Time'); ?></th>
158
- <th class="no-link"><?php echo $lmhelper->__('Environment') . '<br>' . $lmhelper->__('Current Vary'); ?></th>
159
  <th class="no-link a-right"><?php echo $lmhelper->__('Current Position') . ' | ' . $lmhelper->__('List Size') . '<br>' . $lmhelper->__('Total Queried')
160
  . '<br>' . $lmhelper->__('Current Status'); ?></th>
161
  </tr>
@@ -164,7 +171,7 @@ if ($status = $this->getCrawlerStatus()) : ?>
164
  foreach ($status['stores'] as $s) {
165
  ++$i;
166
  $buf = (($i % 2) == 0) ? '<tr class="even">' : '<tr>';
167
- $buf .= '<td class="a-center">' . $s['id'] . ' <a title="Click to see details" target="_blank" class="field-tooltip" href="' . $status['url_details'] . '?list=' . $s['id']
168
  . '"> </a><br/> <a href="' . $status['url_reset'] . '?list=' . $s['id'] . '" title="Click to reset this crawler queue">' . $lmhelper->__('Reset') . '</a></td>'
169
  . '<td>' . $s['store_name']. ' ('. $s['default_curr'] . ')<br>'. $s['baseurl'] . '<br>' . $s['file'] . '</td>'
170
  . '<td class="a-right">' . $s['priority'] . '<br>' . $s['interval'] . '<br>' . $s['ttl'] . '</td>'
@@ -176,7 +183,6 @@ if ($status = $this->getCrawlerStatus()) : ?>
176
  }
177
  ?>
178
  </table></div>
179
- <p class="comment"><?php echo $lmhelper->__('Crawler status updated on') . ' ' . $status['lastupdate'] . '. ' . $status['endreason']; ?></p>
180
  </div>
181
 
182
  <?php endif;
52
  . ' <br>' . $lmhelper->__('Private Cache Hits'); ?></th>
53
  <th class="no-link a-right"><?php echo $lmhelper->__('Full Page Hits')
54
  . '<br>' . $lmhelper->__('Partial Page Hits'); ?></th>
55
+ <th class="no-link a-right"><?php echo $lmhelper->__('LiteMage Cached Objects') . '<br>' . $lmhelper->__('Not Cached (Limited by Plan)'); ?></th>
56
  </tr>
57
  <?php
58
  //$buf = (($i % 2) == 0) ? '<tr class="even">' : '<tr>';
59
+ $limitedCount = $stats['LITEMAGE_LIMITED'] > 0 ? ('<span class="bold emph">' . $stats['LITEMAGE_LIMITED'] . '</span>') : 0;
60
+ $buf = '<tr class="even"><td class="a-center emph">' . $stats['plan'] . '<br>(' . $stats['plan_desc']
61
  . ') <div class="a-right field-tooltip"><div>Available Plans:<hr>LiteMage Starter (1,500 publicly cached objects)<br>LiteMage Standard (25,000 publicly cached objects)<br>LiteMage Unlimited</div></div></td>'
62
  . '<td class="a-right">' . $stats['PUB_HITS']
63
  . ' <div class="a-left field-tooltip"><div>Number of requests that hit public cache since last flush all</div></div><br>'
69
  . ' <div class="a-left field-tooltip"><div>Number of requests partially served from cache (some data retrieved from Magento) since last flush all</div></div></td>'
70
  . '<td class="a-right">' . $stats['LITEMAGE_OBJS']
71
  . ' <div class="a-left field-tooltip"><div>Current LiteMage cached object count</div></div><br>'
72
+ . $limitedCount
73
+ . ' <div class="a-left field-tooltip"><div>Number of requests not served from cache due to plan limitation. You can upgrade your LiteMage plan if this value is not zero.</div></div></td>'
74
  . "</tr>\n";
75
  echo $buf;
76
 
141
  <tr>
142
  <td><h3><?php echo $lmhelper->__('LiteMage Crawler Warm-up Status') ?> <button type="submit" class="scalable"><span><?php echo $lmhelper->__('Refresh') ?></span></button></h3></td>
143
  </tr>
144
+ <tr><td class="scope-label">
145
+ <?php echo $lmhelper->__('You can click Reset All button or Reset links below to restart a crawler queue.') ;
146
+ if ($status['lastupdate']) {
147
+ echo ' Crawler status updated on ' . $status['lastupdate'] . '. ' . $status['endreason'];
148
+ }
149
+ ?>
150
+ </td></tr>
151
  </table>
152
  </div>
153
  </form>
162
  . '<br>' . $lmhelper->__('Public TTL (secs)'); ?>
163
  </th>
164
  <th class="no-link a-center"><?php echo $lmhelper->__('Last Round Finish Time') . '<br>' . $lmhelper->__('Generate Time | Finish Time') . '<br>' . $lmhelper->__('Last Query Time'); ?></th>
165
+ <th class="no-link"><?php echo $lmhelper->__('Environment - Cookie Vary Options') . '<br>' . $lmhelper->__('Current Cookie Vary'); ?></th>
166
  <th class="no-link a-right"><?php echo $lmhelper->__('Current Position') . ' | ' . $lmhelper->__('List Size') . '<br>' . $lmhelper->__('Total Queried')
167
  . '<br>' . $lmhelper->__('Current Status'); ?></th>
168
  </tr>
171
  foreach ($status['stores'] as $s) {
172
  ++$i;
173
  $buf = (($i % 2) == 0) ? '<tr class="even">' : '<tr>';
174
+ $buf .= '<td class="a-center">' . $s['id'] . ' <a title="Click to see URL list details" target="_blank" class="field-tooltip" href="' . $status['url_details'] . '?list=' . $s['id']
175
  . '"> </a><br/> <a href="' . $status['url_reset'] . '?list=' . $s['id'] . '" title="Click to reset this crawler queue">' . $lmhelper->__('Reset') . '</a></td>'
176
  . '<td>' . $s['store_name']. ' ('. $s['default_curr'] . ')<br>'. $s['baseurl'] . '<br>' . $s['file'] . '</td>'
177
  . '<td class="a-right">' . $s['priority'] . '<br>' . $s['interval'] . '<br>' . $s['ttl'] . '</td>'
183
  }
184
  ?>
185
  </table></div>
 
186
  </div>
187
 
188
  <?php endif;
package.xml CHANGED
@@ -1,21 +1,22 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LiteSpeed_LiteMage</name>
4
- <version>1.2.3</version>
5
  <stability>stable</stability>
6
  <license uri="https://opensource.org/licenses/GPL-3.0 ">GPL v3</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>LiteMage Cache speeds up Magento by automatically integrating Magento with LiteSpeed's superior ESI implementation.</summary>
10
  <description>LiteMage Cache is a powerful Magento page caching utility built into LiteSpeed Web Server. It combines superior ESI implementation with easy set up. LiteMage Cache contains a number of optimizations, including combined subrequests, that give it faster, more efficient performance than other page caching utilities. In addition, because it is part of the web server, LiteMage Cache does away with the communication problems and overhead other page caching solutions suffer from. The LiteMage Magento extension then automatically integrates Magento installations with LiteSpeed's top-of-the-line ESI implementation, combining the greatest Magento performance enhancement possible with a painless set up.</description>
11
- <notes>Added a category purge option on the Edit Category screen.&#xD;
12
- Fixed a bug that was introduced in 1.2.0 that affected crawling urls with a cache vary.&#xD;
13
- Fixed a bug where the crawler sometimes did not work properly when setting the LiteMage Server IP.&#xD;
14
- Fixed a bug that occurred when user agent theme exceptions were added for the template and skin, but not added for the layout.</notes>
 
15
  <authors><author><name>LiteSpeed Technologies</name><user>LiteSpeedTech</user><email>lsong@litespeedtech.com</email></author></authors>
16
- <date>2016-10-03</date>
17
- <time>19:30:53</time>
18
- <contents><target name="magecommunity"><dir name="Litespeed"><dir name="Litemage"><dir name="Block"><dir name="Adminhtml"><dir name="Cache"><file name="Management.php" hash="126c636bebf6a1933f45781d6e95863d"/></dir><file name="ItemSave.php" hash="399a23c090fd92436793b1e0e38038a1"/></dir><dir name="Core"><file name="Dummy.php" hash="ae50751905056dd3eb34c3222d17a310"/><file name="Esi.php" hash="32da90253e38aedf67a8c4619bfc983b"/><file name="Messages.php" hash="da581eb4adaa1ac4e2d4b86ff30f08d4"/><file name="Xml.php" hash="6c7d088368f06151be14609dde9afade"/></dir><dir name="Inject"><file name="Jsvar.php" hash="cc0590fe211c81d6d29de570503fe8fd"/><file name="Nickname.php" hash="deba1efffd6449b6492bb13aaca4658b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="ea4515e65dfdfd216bd4f17b80a93092"/><file name="Esi.php" hash="a9cde1e756ad90b492fae9761632e099"/><file name="Viewvary.php" hash="04f39f2d726a3c92f83ff53abdf4cffe"/></dir><dir name="Model"><dir name="Config"><dir name="Backend"><file name="WarmUp.php" hash="663ecf7689115059eb94898f37adeb6f"/></dir><dir name="Source"><file name="CustomerGroup.php" hash="2aa52d9a1614a545035267958be0656f"/><file name="EnableDebugLog.php" hash="27d4b6030f564dfae8c89a84264b1175"/><file name="EnableWarmUp.php" hash="f44aafa2f6ba65a0e4926b7635ff264d"/><file name="FlushCategory.php" hash="b8017a1859b320f05af272f4d4e442e2"/></dir></dir><file name="EsiData.php" hash="98b1ce4bf07d2b795e1efeb5f5b030a9"/><file name="EsiLayout.php" hash="26bef4ee2a873ecb26ba7f292cfe0fd6"/><dir name="Layout"><file name="EsiUpdate.php" hash="3c98a2961b08f0acb3d334ab932eb397"/><file name="Master.php" hash="5eb57ba3677b76468ccf6f74741dcc63"/><file name="Update.php" hash="a72d4beb502803532af5d1ac2a06a06e"/></dir><dir name="Observer"><file name="Cron.php" hash="f41d47e2645d5c6d3dfb954aab21bc2c"/><file name="Esi.php" hash="5807fde7b90682552ddca957a4c6f7e8"/><file name="Purge.php" hash="d46bbebcf3ebe0dded284c9666b44406"/></dir><file name="Session.php" hash="558a80fb45a532af59727ae5657cd380"/><file name="Translate.php" hash="35326b8d2214f516d7dba82519902529"/></dir><dir name="controllers"><file name="AdminController.php" hash="549098ba10e19b066a6d52eab0f7bbb6"/><dir name="Adminhtml"><file name="LitemageCacheController.php" hash="506c63ddec598d39fa8a1dd1e58549d9"/></dir><file name="EsiController.php" hash="7e9fddc9ea18f9536e5d97f299c3f3d2"/></dir><dir name="etc"><file name="config.xml" hash="35c29d09152df7e21d90f33db6b0791b"/><file name="system.xml" hash="1e9b07d6e095634897c1993e0db42495"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="litemage.xml" hash="f4dd1848120e353da9a84a7fd5565093"/></dir><dir name="template"><dir name="litemage"><file name="cache_management.phtml" hash="64c252b79223fe85a071fa9806939575"/><file name="category_save.phtml" hash="b29d102b8f90ce4da881a30efa3b2838"/><file name="product_save.phtml" hash="01863cb9acd33ca51db4f2a26e233eec"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="litemage.xml" hash="4c840b12cc6246f68b1b028f0ef1056d"/></dir><dir name="template"><dir name="litemage"><dir name="inject"><file name="jsvar.phtml" hash="5bbd9992e7ba5925d09f21cf03237676"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Litespeed_Litemage.xml" hash="ba0c8904bc89219c6829e37cc14d9bdd"/></dir></target><target name="mage"><dir name="shell"><file name="litemage_purge.php" hash="fbcc05832098dfbda5d30bfe24973fab"/></dir></target></contents>
19
  <compatible/>
20
  <dependencies><required><php><min>5.3.0</min><max>7.1.0</max></php></required></dependencies>
21
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LiteSpeed_LiteMage</name>
4
+ <version>1.3.0</version>
5
  <stability>stable</stability>
6
  <license uri="https://opensource.org/licenses/GPL-3.0 ">GPL v3</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>LiteMage Cache speeds up Magento by automatically integrating Magento with LiteSpeed's superior ESI implementation.</summary>
10
  <description>LiteMage Cache is a powerful Magento page caching utility built into LiteSpeed Web Server. It combines superior ESI implementation with easy set up. LiteMage Cache contains a number of optimizations, including combined subrequests, that give it faster, more efficient performance than other page caching utilities. In addition, because it is part of the web server, LiteMage Cache does away with the communication problems and overhead other page caching solutions suffer from. The LiteMage Magento extension then automatically integrates Magento installations with LiteSpeed's top-of-the-line ESI implementation, combining the greatest Magento performance enhancement possible with a painless set up.</description>
11
+ <notes>Major feature improvement: Improved first page load speed for new visitors. This feature requires LiteSpeed Web Server 5.1.10 or LiteSpeed Load Balancer 2.0.1&#xD;
12
+ New feature: allow separate cache copies for each defined user group. &#xD;
13
+ New feature: allow crawlers to warm a copy of the site for logged in users.&#xD;
14
+ Improved generation of site urls.&#xD;
15
+ Bug fix: Fixed a bug caused when ESI blocks have child blocks with special layout handles.</notes>
16
  <authors><author><name>LiteSpeed Technologies</name><user>LiteSpeedTech</user><email>lsong@litespeedtech.com</email></author></authors>
17
+ <date>2016-11-04</date>
18
+ <time>18:56:42</time>
19
+ <contents><target name="magecommunity"><dir name="Litespeed"><dir name="Litemage"><dir name="Block"><dir name="Adminhtml"><dir name="Cache"><file name="Management.php" hash="126c636bebf6a1933f45781d6e95863d"/></dir><file name="ItemSave.php" hash="399a23c090fd92436793b1e0e38038a1"/></dir><dir name="Core"><file name="Dummy.php" hash="ae50751905056dd3eb34c3222d17a310"/><file name="Esi.php" hash="32da90253e38aedf67a8c4619bfc983b"/><file name="Messages.php" hash="da581eb4adaa1ac4e2d4b86ff30f08d4"/><file name="Xml.php" hash="6c7d088368f06151be14609dde9afade"/></dir><dir name="Inject"><file name="Jsvar.php" hash="cc0590fe211c81d6d29de570503fe8fd"/><file name="Nickname.php" hash="deba1efffd6449b6492bb13aaca4658b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="56fc8147598fb889193351075227ff0b"/><file name="Esi.php" hash="24ab4a5683e957d574b6fa1fc0a6c30d"/><file name="Viewvary.php" hash="9dfe26a70510a1899f4dcde62d91a21d"/></dir><dir name="Model"><dir name="Config"><dir name="Backend"><file name="WarmUp.php" hash="663ecf7689115059eb94898f37adeb6f"/></dir><dir name="Source"><file name="CustomerGroup.php" hash="f28a5381d6b79f71c054b3072973041b"/><file name="EnableDebugLog.php" hash="27d4b6030f564dfae8c89a84264b1175"/><file name="EnableWarmUp.php" hash="f44aafa2f6ba65a0e4926b7635ff264d"/><file name="FlushCategory.php" hash="b8017a1859b320f05af272f4d4e442e2"/></dir></dir><file name="EsiData.php" hash="1d2cea8ce32848472f1c999660647f19"/><file name="EsiLayout.php" hash="26bef4ee2a873ecb26ba7f292cfe0fd6"/><dir name="Layout"><file name="EsiUpdate.php" hash="3c98a2961b08f0acb3d334ab932eb397"/><file name="Master.php" hash="5eb57ba3677b76468ccf6f74741dcc63"/><file name="Update.php" hash="a72d4beb502803532af5d1ac2a06a06e"/></dir><dir name="Observer"><file name="Cron.php" hash="82f12d28ef80dff943417b5d997eea36"/><file name="Esi.php" hash="d7df22841837600414c5662e4616f6a4"/><file name="Purge.php" hash="84e83b6aa28a72a6c8b86b0656d2f022"/></dir><file name="Session.php" hash="558a80fb45a532af59727ae5657cd380"/><file name="Translate.php" hash="35326b8d2214f516d7dba82519902529"/></dir><dir name="controllers"><file name="AdminController.php" hash="549098ba10e19b066a6d52eab0f7bbb6"/><dir name="Adminhtml"><file name="LitemageCacheController.php" hash="506c63ddec598d39fa8a1dd1e58549d9"/></dir><file name="EsiController.php" hash="89b0432844ad4494c2609c373bc0e376"/></dir><dir name="etc"><file name="config.xml" hash="d80b5b9ba85203cf74971529dd5f0acd"/><file name="system.xml" hash="a33907fe781272f911c9a2c2a56c9781"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="litemage.xml" hash="f4dd1848120e353da9a84a7fd5565093"/></dir><dir name="template"><dir name="litemage"><file name="cache_management.phtml" hash="478836f2a9aa54e6d1e3fbf2164bbfcc"/><file name="category_save.phtml" hash="b29d102b8f90ce4da881a30efa3b2838"/><file name="product_save.phtml" hash="01863cb9acd33ca51db4f2a26e233eec"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="litemage.xml" hash="4c840b12cc6246f68b1b028f0ef1056d"/></dir><dir name="template"><dir name="litemage"><dir name="inject"><file name="jsvar.phtml" hash="5bbd9992e7ba5925d09f21cf03237676"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Litespeed_Litemage.xml" hash="ba0c8904bc89219c6829e37cc14d9bdd"/></dir></target><target name="mage"><dir name="shell"><file name="litemage_purge.php" hash="fbcc05832098dfbda5d30bfe24973fab"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.3.0</min><max>7.1.0</max></php></required></dependencies>
22
  </package>