PHP-HYPERCACHER Standard Changelog -------------------------------------------- Version 1.960 (2007-12-25) NEW CMS SUPPORT: - 4images Image Gallery 1.7.4 (however the installation instruction should work with older versions too) FIXED: - Moderately critical safety issue which causes some types of DDoS attacks at websites with Hypercacher to be more effective than normal DDoS Attacks. Due to the fact that it can be taken advantege of, i will not publish more information about this for some time. ADDED: - New setting that can be used to limit the hard drive space usage of PHP Hypercacher: $maximum_cachefiles_number variable. This variable limits the maximum number of cachefiles that will exist at once. If number of files exceeds this variable, no more of new cachefiles will be created. $maximum_cachefiles_number is set to 10000 by default. -------------------------------------------- Version 1.950 (2007-09-08) NEW CMS SUPPORT: - Coppermine Photo Gallery 1.4.12 - PHPBB Modified By Przemo 1.12.5 ADDED: - HCACHER_PRESENT constant was added to Hypercacher HEADER. This is done to increase compatibility in scripts that sometimes execute only FOOTER of Hypercacher. Now, because of this constant, Hypercacher FOOTER will not execute at all if the HEADER did not execute as well. -------------------------------------------- Version 1.949 (2007-06-13) CHANGED: - Checking for "cachewalker" command in the REQUEST_URI removed, as it was completely unnecessary, only slowed down the execution of the script and could potentially cause some compatibility problems when opening PHP pages with "cachewalker" string in URL - Name of 'cachewalker' cookie changed to '__cachewalker'. This is done to avoid potential compatibility problems in the future - When an user visits a website using PHP Hypercacher, all cookies are initially ignored by PHP Hypercacher when determining diffrence between subpages, until the user sends a form (so Hypercacher assumes he/she may have logged on). This should give Hypercacher a very nice speedup on some sites, especially that cookie array is not processed/removed/checked at all (which must take some CPU power), when cookies are totally ignored. FIXED: - Google analytics random cookie issue: when using Google Analytics scripts which is generating cookies with random contents caused Hypercacher to recognize every subpage as diffrent, and generate a new cachefile every visit on the site instead of reading previously saved ones. I fixed this by adding $request_uri_exclude_arr to the script - now cookie names can be searched and destroyed using the array. NOTE: This works like a WILDCARD - In regular expressions /(.*)string(.*)/ - so exemplary entry $cookie_name_ignore_array = array('_utm', '_trackingcookie'); will search and destroy all cookies with names having '_utm' OR '_trackingcookie' ANYWHERE inside them. This is also Case INsensitive. So '_utm' removes all Google Analytics cookies - named __utma, __utmb, __utmc, __utmv etc. - All random cookies / tracking cookies / session cookies issues should be now gone FOREVER, as Hypercacher now ignores all cookies by default, UNTIL user browsing your site sends a form - then all cookies are "unlocked" and become visible to PHP Hypercacher, so he can distinguish pages with diffrent cookies. However, having a tracking cookie which name is not placed in the $cookie_name_ignore_array array variable can still affect the performance of Your site seriously, so if You know of a cookie like this, You can enter its name (or a core part of its name) into $cookie_name_ignore_array array. ADDED: - '$cookie_unlock_time' variable (integer number of seconds). This variable specifies how long should cookies be unlocked for an user who sends a form. Length of this time also determines the maximum time a user can be logged in on the website without sending any form. After the time passes, all cookies will become invisible to PHP Hypercacher so effectively the user will be logged off. - Initial ignoring of cookies gives Hypercacher a major speed increase - especially on sites where there are many diffrent cookies as usually most users visit the site and does not send any form, login/logoff or whatever - they just seek some information, browse the site a little and go somewhere else. - '$request_uri_exclude_arr' array variable. This array can be used to EXCLUDE some randomly generated cookies, and make them completely invisible to PHP-Hypercacher. This is used to fix the issue with Google Analytics scripts and can be used to make solve problems with all TRACKING/RANDOM COOKIES (and actually You can make ANY cookie invisible to Hypercacher if You want) with random variables to be invisible to Hypercacher to squeeze even more performance from your site. -------------------------------------------- Version 1.926 (2007-05-15) CHANGED: - "disk read buffer size [$bl] variable removed as it was unused since Hypercacher is now using file_get_contents() - According to the suggestions of users "PiotrLegnica" and "UDAT" from Polish PHP Forum, the way of detecting commands like 'dontdocache', 'reloadcache' and 'cachewalker' changed, what should speed up code execution a little bit. See the topic here : http://forum.php.pl/index.php?showtopic=66782&st=60 - Using "function_exists" instead of constants to determine if function was declared - According to the suggestions of user "UDAT" from Polish PHP Forum: http://forum.php.pl/index.php?showtopic=66782&st=60 - According to the suggestions of users "UDAT" and "devnull" from Polish PHP Forum, most of variable names in DEV version were lengthened. See the topic here http://forum.php.pl/index.php?showtopic=66782&st=60 - Decreased cache delete time to [cache refresh time] + 600 seconds, instead of previous [cache refresh time] + 3600 seconds. This should save a lot of disk space on very busy services. Long cache delete time is no longer necessary as the Hypercacher algorithm changed some time ago. ADDED: - Minor speed increase - Some code optimization - Major disk space usage decrease -------------------------------------------- Version 1.921 (2007-05-08) CHANGED: - "$_SERVER['REQUEST_URI']" Predefined variable value added to the diffrence determining variable. This fixed BUGS occuring when using Hypercacher with some CMSes with URL translation option turned ON (like JOOMLA) - Minor speed decrease, because of new way of determining changes in page display FIXED: - Hypercacher and Joomla works now fine, even when URL Translation option is ON. -------------------------------------------- Version 1.920 (2007-04-28) CHANGED: - All the rest of double quotes (") were changed to single quotes (') - where possible - When reading content from cachefile, functions fopen(), fread() and fclose() were replaced by one faster, simple function - file_get_contents. Because of this, PHP Hypercacher Standard now requires PHP version 4.3.0 or later to work. - Critical Control Variables needed for Hypercacher to work correctly, which are created in Hypercacher HEADER now are changed to CONSTANTS. This change should completely eleminate some problems with CMSes having ANTI-REGISTER GLOBALS security mechanisms. FIXED: - Because of Critical Control Variables of Hypercacher are now constants, compatibility problems when using Hypercacher with JOOMLA (when UNREGISTER GLOBALS security function is turned ON) and PHP-NUKE are gone. ADDED: - Minor source code size decrease - Major speed increase, because of new faster cachefile reading funtcion and change of double quotes to single quotes - Additional code optimization -------------------------------------------- Version 1.906 (2007-04-22) CHANGED: - $au (additional determining parameters) parameter removed as it was completely unused. - Default minimum cachefile size changed to 384 bytes. - Minor code optimization: small code size decrease in Hypercacher FOOTER -------------------------------------------- Version 1.905 (2007-04-20) FIXED: - Because of the new minimum cache filesize parameter, all of the PHP Hypercacher's BUGs when working with MediaWiki should now be removed. - Mediawiki should now be fully functional even without using EXCLUDE STRINGS array parameter. CHANGED: - SF_HASH [sf_qhsx()] hashing function is replaced by faster MD5 function which was proven by Javascript/PHP benchmarks. Change was suggested by user "slawekneo" at php-fusion.pl forum - here: http://php-fusion.pl/forum/viewthread.php?forum_id=7&thread_id=12045&rowstart=40 - When a cache file is smaller than number of bytes specified in a special parameter ($sm), PHP Hypercacher won't load content from cache - it will start the whole script normally instead, and save result to cache afterwards. - Major code size decrease - Some double quotes "" were changed to single quotes '' which are faster to compile/execute in PHP. ADDED: - Minimum cache file size to parameter ($sm) to determine whether a cachefile is valid or not. - Major speed increase, because of the new hashing function and code size decrease. -------------------------------------------- Version 1.901 FIXED: - Mediawiki CMS should now be fully functional with PHP-Hypercacher, however it requires setting a EXCLUDE STRING parameter in PHP-Hypercacher HEADER's code. CHANGED: - Minor code optimization and reorganization in Hypercacher's HEADER. This should speed up Hypercacher a tiny bit. ADDED: - "Cachewalker" command when sending a form to PHP script using PHP-Hypercacher. If PHP-Hypercacher receives a "cachewalker" command, it assumes, that content of any page may be changed, so the user who sent a form will have additional cookie which will cause all pages browsed by him to be refreshed and then stored to cache, not loaded from cache. This is VERY useful in CMSes that change content often (egz. MediaWiki, Forums). - Exclude certain pages from caching. Now you can specify strings of which occurrence in URL address will cause PHP-Hypercacher to be turned OFF. This is done specially for MediaWiki CMS, wchich has "special pages" (egz. Random page) that don't work with PHP-Hypercacher very well. - New in-code configurable parameter: Time of "cache walking" determining lifetime of cachewalker cookie, after sending a form (default is half of the cache refresh time). - New in-code configuration parameter: Array of "exclude strings" which will cause PHP-Hypercacher to be turned OFF. -------------------------------------------- Version 1.855 FIXED: - BUG: When using PHP-Hypercacher with BtitTracker CMS, outputting content to the browser from a cache file when cache is outdated causes "header already sent" error in PHP, which is written into the cache. - Fixing this BUG has also FIXED the cooperation of PHP-Hypercacher and MediaWiki CMS. Now PHP-Hypercacher and PHP-Hypercacher GZIP FINALLY works with MediaWiki CMS (but some pages are not 100% functional yet). CHANGED: - Minor code optimization: Decreased code size by changing "true" to "1" in some places. - Improved clarity of the code a little. ADDED: - More debug messages : "Cache outdated (10)" and "Cache reload requested (11)" -------------------------------------------- Version 1.850 CHANGED: - Automated modification of forms in HTML code, so when client is sending a form, PHP-Hypercacher will disable itself. -------------------------------------------- version 1.834 ADDED: - Changed the way in which 'reloadcache' and 'dontdocache' commands are recognizedl. Now any type of POST and GET pool in form can be used to cause cache reload or cache switch off. -------------------------------------------- version 1.832 ADDED: - Minor speed increase - General PHP code optimization: decreased the size of code by lots of bytes. -------------------------------------------- version 1.830 ADDED: - Major speed increase: upgrade of the hashing function, so it can work even 40% faster than before. This change gave the Hypercacher a really nice speedup ;). -------------------------------------------- version 1.827 FIXED: - Increased compatilibity of PHP-Hypercacher with diffrent CMS systems, some code was rewritten. ADDED: - General PHP code optimization: decreased the size of code -------------------------------------------- version 1.7x FIXED: - More BUGfixes. CHANGED: - Major code optimization and decrease. -------------------------------------------- version 1.5x FIXED: - Lots of BUGfixes. CHANGED: - Many many many code optimizations... I don't remember in detail. -------------------------------------------- ******************************************** A BIG MEMORY GAP HERE - I have no idea what exactly i have changed (as i wasn't yet writing CHANGELOG back then), but I'm sure I changed a lot. ******************************************** -------------------------------------------- version 1.21 ADDED: - The automated removal only removes small number of files, so it doesn't increase the server CPU and disk load, and is only done, when cache is reloaded or created (it's not often, so server load decreases as well) -------------------------------------------- version 1.17 ADDED: - Fully automated removing of old cache files after a fixed time period