Version Notes
Fixed the default warm up server IP setting introduced in 1.2.1
Download this release
Release Info
Developer | LiteSpeed Technologies |
Extension | LiteSpeed_LiteMage |
Version | 1.2.2 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.2.2
app/code/community/Litespeed/Litemage/Helper/Data.php
CHANGED
@@ -714,7 +714,7 @@ class Litespeed_Litemage_Helper_Data extends Mage_Core_Helper_Abstract
|
|
714 |
$warmup = $this->_conf['defaultlm']['warmup'] ;
|
715 |
$server_ip = trim($warmup[self::CFG_WARMUP_SERVER_IP]) ;
|
716 |
if ( !$server_ip || ! Mage::helper('core/http')->validateIpAddr($server_ip) ) {
|
717 |
-
$server_ip = '
|
718 |
}
|
719 |
$delta_log = isset($this->_conf['defaultlm']['test']['delta_log']) && ($this->_conf['defaultlm']['test']['delta_log'] == 1);
|
720 |
$this->_conf[self::CFG_WARMUP] = array(
|
714 |
$warmup = $this->_conf['defaultlm']['warmup'] ;
|
715 |
$server_ip = trim($warmup[self::CFG_WARMUP_SERVER_IP]) ;
|
716 |
if ( !$server_ip || ! Mage::helper('core/http')->validateIpAddr($server_ip) ) {
|
717 |
+
$server_ip = '' ; //default
|
718 |
}
|
719 |
$delta_log = isset($this->_conf['defaultlm']['test']['delta_log']) && ($this->_conf['defaultlm']['test']['delta_log'] == 1);
|
720 |
$this->_conf[self::CFG_WARMUP] = array(
|
app/code/community/Litespeed/Litemage/Model/Observer/Cron.php
CHANGED
@@ -221,20 +221,24 @@ class Litespeed_Litemage_Model_Observer_Cron extends Varien_Event_Observer
|
|
221 |
$regular = array();
|
222 |
$ajax = array();
|
223 |
foreach ($urls as $url) {
|
224 |
-
|
225 |
-
|
226 |
-
$
|
227 |
-
|
228 |
-
|
229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
}
|
231 |
else {
|
232 |
-
|
233 |
-
$this->_debugLog('invalid url ' . $url);
|
234 |
-
}
|
235 |
-
continue;
|
236 |
}
|
237 |
-
|
238 |
if ($url2{0} == ':')
|
239 |
$ajax[] = substr($url2, 1);
|
240 |
else
|
221 |
$regular = array();
|
222 |
$ajax = array();
|
223 |
foreach ($urls as $url) {
|
224 |
+
if ($server_ip) {
|
225 |
+
// replace domain with direct IP
|
226 |
+
if (preg_match($pattern, $url, $m)) {
|
227 |
+
$domain = $m[1];
|
228 |
+
$pos = strpos($url, $domain);
|
229 |
+
$url2 = substr($url, 0, $pos) . $server_ip . substr($url, $pos + strlen($domain));
|
230 |
+
$curlOptions[CURLOPT_HTTPHEADER] = array("Host: $domain");
|
231 |
+
}
|
232 |
+
else {
|
233 |
+
if ( $this->_isDebug ) {
|
234 |
+
$this->_debugLog('invalid url ' . $url);
|
235 |
+
}
|
236 |
+
continue;
|
237 |
+
}
|
238 |
}
|
239 |
else {
|
240 |
+
$url2 = $url;
|
|
|
|
|
|
|
241 |
}
|
|
|
242 |
if ($url2{0} == ':')
|
243 |
$ajax[] = substr($url2, 1);
|
244 |
else
|
app/code/community/Litespeed/Litemage/etc/config.xml
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
<config>
|
27 |
<modules>
|
28 |
<Litespeed_Litemage>
|
29 |
-
<version>1.2.
|
30 |
</Litespeed_Litemage>
|
31 |
</modules>
|
32 |
<global>
|
@@ -472,7 +472,7 @@
|
|
472 |
</general>
|
473 |
<warmup>
|
474 |
<enable_warmup>0</enable_warmup>
|
475 |
-
<server_ip
|
476 |
<load_limit>5</load_limit>
|
477 |
<thread_limit>6</thread_limit>
|
478 |
<max_time>360</max_time>
|
26 |
<config>
|
27 |
<modules>
|
28 |
<Litespeed_Litemage>
|
29 |
+
<version>1.2.2</version>
|
30 |
</Litespeed_Litemage>
|
31 |
</modules>
|
32 |
<global>
|
472 |
</general>
|
473 |
<warmup>
|
474 |
<enable_warmup>0</enable_warmup>
|
475 |
+
<server_ip/>
|
476 |
<load_limit>5</load_limit>
|
477 |
<thread_limit>6</thread_limit>
|
478 |
<max_time>360</max_time>
|
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.
|
31 |
<sort_order>5000</sort_order>
|
32 |
</Litespeed_Litemage>
|
33 |
</tabs>
|
@@ -290,7 +290,7 @@
|
|
290 |
</enable_warmup>
|
291 |
<server_ip translate="label,comment">
|
292 |
<label>LiteMage Server IP</label>
|
293 |
-
<comment>Tell the crawler where the LiteMage cache server is located so it can directly hit the server instead of having to go through
|
294 |
<frontend_type>text</frontend_type>
|
295 |
<sort_order>15</sort_order>
|
296 |
<show_in_default>1</show_in_default>
|
27 |
<config>
|
28 |
<tabs>
|
29 |
<Litespeed_Litemage translate="label">
|
30 |
+
<label>LiteMage Cache 1.2.2</label>
|
31 |
<sort_order>5000</sort_order>
|
32 |
</Litespeed_Litemage>
|
33 |
</tabs>
|
290 |
</enable_warmup>
|
291 |
<server_ip translate="label,comment">
|
292 |
<label>LiteMage Server IP</label>
|
293 |
+
<comment>Tell the crawler where the LiteMage cache server is located so it can directly hit the server instead of having to go through proxy. Use this if LiteMage is behind a CDN or proxy server or on LiteSpeed Load Balancer in front of the crawler node.</comment>
|
294 |
<frontend_type>text</frontend_type>
|
295 |
<sort_order>15</sort_order>
|
296 |
<show_in_default>1</show_in_default>
|
package.xml
CHANGED
@@ -1,26 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>LiteSpeed_LiteMage</name>
|
4 |
-
<version>1.2.
|
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>
|
12 |
-
Added support for LiteSpeed Load Balancer (LSLB). LiteMage cache will be located on your LSLB, no need to change your local web server setup.
|
13 |
-
Added support to purge by store ID.
|
14 |
-
Added a command line tool to purge LiteMage cache. This tool is located under the shell subdirectory under the Magento root directory.
|
15 |
-
Improved crawler and added delta crawler logging.
|
16 |
-
Improved new visitor detection when visitor log is disabled.
|
17 |
-
Allow users to specify what saving a product form the admin panel automatically purges.
|
18 |
-
Fixed a bug caused by specifying a different theme for different categories.
|
19 |
-
</notes>
|
20 |
<authors><author><name>LiteSpeed Technologies</name><user>LiteSpeedTech</user><email>lsong@litespeedtech.com</email></author></authors>
|
21 |
-
<date>2016-09-
|
22 |
-
<time>16:
|
23 |
-
<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="70a8adbbc723c4134957f549333122c9"/></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="
|
24 |
<compatible/>
|
25 |
<dependencies><required><php><min>5.3.0</min><max>7.1.0</max></php></required></dependencies>
|
26 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>LiteSpeed_LiteMage</name>
|
4 |
+
<version>1.2.2</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>Fixed the default warm up server IP setting introduced in 1.2.1</notes>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<authors><author><name>LiteSpeed Technologies</name><user>LiteSpeedTech</user><email>lsong@litespeedtech.com</email></author></authors>
|
13 |
+
<date>2016-09-14</date>
|
14 |
+
<time>16:46:11</time>
|
15 |
+
<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="70a8adbbc723c4134957f549333122c9"/></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="775ffb0d2c0e9de0e8eff9f0ff13dfb3"/><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="bda13283b5353ab41c0382b2c9846ead"/><file name="Esi.php" hash="c8f15321aa9cdb1f62603482f69dae79"/><file name="Purge.php" hash="1443771fa96b59cf7934d0c79ea8e38e"/></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="86bf427c2b53788cdb5f5fae964eb4ff"/></dir><file name="EsiController.php" hash="80bee25260f28cd3e14f3cdf252b9308"/></dir><dir name="etc"><file name="config.xml" hash="263a86be9bb933c83eadc91e38d0893a"/><file name="system.xml" hash="27df4f204df987963fe6e3f4a64d96d9"/></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="fa4b3e5d70cdba64fca41fbe7446052b"/><file name="product_save.phtml" hash="17e2b188a7008a1c2964cf12b596cd3a"/></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>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>7.1.0</max></php></required></dependencies>
|
18 |
</package>
|
shell/litemage_purge.php
CHANGED
@@ -57,12 +57,14 @@ class Litespeed_Litemage_Shell_Purge extends Mage_Shell_Abstract
|
|
57 |
if ($pos = strpos($base, 'litemage_purge')) {
|
58 |
$base = substr($base, 0, $pos);
|
59 |
}
|
60 |
-
|
61 |
-
|
62 |
-
$
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
66 |
}
|
67 |
|
68 |
$url = $base . 'litemage/admin/shell/' . implode('/', $params);
|
57 |
if ($pos = strpos($base, 'litemage_purge')) {
|
58 |
$base = substr($base, 0, $pos);
|
59 |
}
|
60 |
+
if ($server_ip) {
|
61 |
+
$pattern = "/:\/\/([^\/^:]+)(\/|:)?/";
|
62 |
+
if (preg_match($pattern, $base, $m)) {
|
63 |
+
$domain = $m[1];
|
64 |
+
$pos = strpos($base, $domain);
|
65 |
+
$base = substr($base, 0, $pos) . $server_ip . substr($base, $pos + strlen($domain));
|
66 |
+
$options[CURLOPT_HTTPHEADER] = array("Host: $domain");
|
67 |
+
}
|
68 |
}
|
69 |
|
70 |
$url = $base . 'litemage/admin/shell/' . implode('/', $params);
|