Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted September 24, 200618 yr I see it in the feature list:1. A caching class system has been installed. eaccelerator, disk caching, turck mmcache, and memcache are directly supported. Other caching engines can be used, however many do not have API's allowing IPB to take further advantage of them over their default behavior.8. MySQLi driver support (automatically detected and selected) as well as MySQL5 supportbut how to set my IPB to use it? Just set it in php.ini and install the extensions? And please add Xcache(http://trac.lighttpd.net/xcache/wiki) support.
September 24, 200618 yr 1. A caching class system has been installed. eaccelerator, disk caching, turck mmcache, and memcache are directly supported. Other caching engines can be used, however many do not have API's allowing IPB to take further advantage of them over their default behavior.this mainly means those CACHING products for your server are now supported fully
September 24, 200618 yr this mainly means those CACHING products for your server are now supported fullyBut those CACHING products seems work for ALL php applications. What does the IPB's fully support?
September 24, 200618 yr Yes, the caching systems are supported but you need to add a line to the conf_global.php to enable them.Documentation will probably be released shortly with what to add.MySQLi is automatically detected and used, unlike the caching sytems.If I remember correctly, to enable eAccelerator support you add this at the top of conf_global.php (after <?php of course):$INFO['use_eaccelerator'] = 1;Rebuild all your caches after also.
September 24, 200618 yr If I remember correctly, to enable eAccelerator support you add this at the top of conf_global.php (after <?php of course):$INFO['use_eaccelerator'] = 1;Rebuild all your caches after also.How did you know this? I thought it is automatically enabled once you installed eaccelerator. I see many of the cached scripts by when running eaccelerator.php. :blink: and what about Zend? Do you need to add a line in conf_global.php too?
September 24, 200618 yr Because I am a beta tester and we know this :PNo, Zend is controlled by IPB. You only need to opt in to enable eaccelerator in your conf_global.php with the line I gave above.
September 25, 200618 yr damn, all this time I thought eaccelerator was enabled on my boards :oIn fact, if eAccelerator is installed on your server, it will cache php files. But IPB didn't do more about supporting it, it will be done with 2.2. IPB 2.2 will use some APIs of these caching systems to support them better.
September 25, 200618 yr In fact, if eAccelerator is installed on your server, it will cache php files. But IPB didn't do more about supporting it, it will be done with 2.2. IPB 2.2 will use some APIs of these caching systems to support them better.so should I add that line to conf_global.php to enable eaccelerator?
September 25, 200618 yr Yes, to enable IPB to better support it and take full advantage. You'll notice a significant speed boost after you rebuild your caches with that line added.
September 25, 200618 yr I have had EAccelerator installed on my server for a long time and never heard about the alteration to the config file.I just made that addition and rebuilt the caches and now the forum speed is like a scaled ape.Thanks for the tip.P.S. the correct change is:$INFO['use_eaccelerator'] = '1';
September 25, 200618 yr Sounds good. But I cannot perorate the speed up, When I am not use the v2.2 to my public board and test the speed when 500 members online.
September 25, 200618 yr I added that line to conf_global.php and rebuild ALL the cache. One odd thing I noticed is that the last active date on member's profile is incorrect. It shows "July 8, 2005" for one of the member's online. :huh: :o
September 26, 200618 yr Here is an unofficial doc I wrote. Any php script can be cached by eaccelerator, however IPB 2.2 now utilizes API's provided by a few of the caching scripts so that it can directly store and retrieve data from memory.@Invisionrocks, shouldn't be caused by the new caching engine support because member data isn't stored in cache...If in doubt, try disabling eaccelerator (if you have enabled it - if not, this issue is moot).Invision Power Board Cache SupportIntroductionInvision Power Board uses a lot of relatively static, yet site-specific and configurable, data during page execution. An example of this would be the forum data - while it changes, and is dynamic, the forum structure itself does not change from page to page.To counter-act resource issues, IPB caches relatively static data so that it does not need to access several individual tables on each page load. This article explains the methods IPB can cache this data, and how you can configure these methods. Included is also a brief overview of how you could create a new caching class, should you find it necessary.If you decide to use an alternate cache class, after enabling it you may wish to log into your ACP and rebuild all of your caches under Tools & Settings, Cache Control. Click the button at the top right of the header, and click Rebuild All.Database Cache (Default)By default in IPB 2.2 (as occurred in IPB 2.1) Invision Power Board serializes and caches it's data in the ibf_cache_store database table. One query is used when the page first starts to load to pull the specific 'cache store' keys that it will use during page execution. No changes are necessary to use this cache method.If you find that this database table repeatedly 'locks' (using MySQL) you can try setting this database table engine to InnoDB to attempt to prevent it from locking when multiple users are accessing the same data.Disk CacheIf you find that your ibf_cache_store still locks after setting the table type to InnoDB, you can use the disk cache method if you prefer. In order to use this cache method1) You cannot be running under safe_mode2) Your ./cache folder must be CHMOD 777When the method is enabled, IPB will create and write to files in this folder to pull the cache data it requires. While profiling the cache methods available in IPB, this method was found to be the slowest, and as such it is not recommended to use disk caching unless necessary.To enable disk caching, open your ./conf_global.php file in a text editor. Findand add after this line of code$INFO['use_diskcache'] = 1;Save the file and upload it back to your server. Turck MMCacheTurck MMCache is no longer in development. The module has evolved into Eaccelerator, however if you have an older version of PHP with Turck MMCache installed, you can make use of IPB's support for it by modifying your conf_global.php file. Find:and add after this line of code$INFO['use_mmcache'] = 1;Turck MMCache will cache the data into memory cutting access time drastically. Outside of IPB's support for cache storage, Turck MMCache also caches php code in a compiled state, reducing php execution time of scripts. More information about Turck MMCache can be found hereEacceleratorEaccelerator is probably the most popular cache engine installed on shared and dedicated servers presently. Eaccelerator is a brach off of the original Turck MMCache software, and performs in the same manner as the original Turck MMCache. If you login to your ACP, click on PHPINFO, and search for "Eaccelerator" you may find it is already installed.To enable IPB's support for eaccelerator, open conf_global.php and findadd after this line of code$INFO['use_eaccelerator'] = 1;More information regarding eaccelerator can be found hereMemCacheMemcache is a distributed memory object caching system with the intended implementation designed to reduce load to the database by storing data that is accessed consistently in memory. IPB can utilize memcache just as it utilizes Eaccelerator, or the database directly.To enable IPB's support for memcache, open conf_global.php and findand add after this line of code$INFO['memcache_server_1'] = "SERVER ADDRESS HERE";$INFO['memcache_port_1'] = "SERVER PORT HERE";$INFO['use_memcache'] = 1;It is important to configure the server address and port when adding this information to your conf_global.php file.Additionally, IPB can support up to two additional memcache slaves. If you have more than one memcache server, you can configure up to two more by adding $INFO['memcache_port_2'] = "SERVER 2 PORT HERE";$INFO['memcache_server_3'] = "SERVER 3 ADDRESS HERE"; $INFO['memcache_port_3'] = "SERVER 3 PORT HERE";$INFO['memcache_server_2'] = "SERVER 2 ADDRESS HERE";Creating your own cache engine libraryWhile we are not aware of any other third party cache engines available, if you wished to create a module to access one (such as custom in-house caching engine), two steps would need to be taken.Modify ipsclass.php method init_cache_setup() and add code similar to the following $this->cachelib = new cache_lib( $this->vars['board_url'] ); $this->cachelib->connect( $this->vars );require KERNEL_PATH.'class_cache_memcache.php';Point this to the name of the file you locate under ./ips_kernel (see the next step)Create a new class to place in ./ips_kernel to support your cache library. This will be custom-developed to support your application, however here is a basic template with all the methods called from IPB/*+--------------------------------------------------------------------------| Invision Power Services Kernel [Cache Abstraction]| Invision Power Board v<{%dyn.down.var.human.version%}>| =============================================| by Matthew Mecham| (c) 2001 - 2005 Invision Power Services, Inc.| http://www.invisionpower.com| =============================================| Web: http://www.invisionboard.com+---------------------------------------------------------------------------| THIS IS NOT FREE / OPEN SOURCE SOFTWARE+---------------------------------------------------------------------------|| > Core Module| > Module written by Brandon Farber| > Date started: Friday 19th May 2006 17:33 || > Module Version Number: 1.0+--------------------------------------------------------------------------*//*** IPS Kernel Pages: Cache Object Core* -- Memcache Cache Storage** Basic Usage Examples* * $cache = new cache_lib( 'identifier' );* Update:* $db->do_put( 'key', 'value' [, 'ttl'] );* Remove* $db->do_remove( 'key' );* Retrieve* $db->do_get( 'key' );* * * @package IPS_KERNEL* @subpackage Cache Abstraction* @author Brandon Mecham* @version 1.0*/class cache_lib{ var $identifier; var $crashed = 0; var $link; function cache_lib( $identifier='' ) { // Object constructor if necessary } function connect( $server_info=array() ) { // Connection/ error-checking/ initialization routine } function disconnect() { // Disconnect routine, if necessary, otherwise leave blank } function do_put( $key, $value, $ttl=0 ) { // Puts data in cache } function do_get( $key ) { // Retrieves and returns data from cache } function do_remove( $key ) { // Removes data from cache }}?><?phpIf an error is encountered during the library setup, set $this->crashed = 1 so that IPB will know not to access it throughout it's execution.NotesIPS will not install or support any third party cache engine libraries - you (or your host) must install any cache library (such as eaccelerator or memcache) and ensure it is operational. During troubleshooting, if we determine the cache engine itself is the fault of any issues, we may disable it to verify as such.IPB only caches skin set data, and the data in ibf_cache_store - it does not cache all content
September 26, 200618 yr IPB only caches skin set data, and the data in ibf_cache_store - it does not cache all contentIt's sound good. And please add Xcache(http://trac.lighttpd.net/xcache/wiki) support.
September 27, 200618 yr What's the difference between eAccelerator and Xcache ?Actually I find that eAccelerator is a good caching system.
September 27, 200618 yr What's the difference between eAccelerator and Xcache ?Actually I find that eAccelerator is a good caching system.It's a more stable accelerator and support all php version.http://www.sitebuddy.com/php/accelerator_xcache
October 19, 200618 yr My host claims zend optimizer and Eaccelerator are the same type things. This isn't true, is it? That is what they told me when I asked if they would install it. They usually install anything I ask them to.
October 19, 200618 yr That's what I thought. I don't know why he said that. I will just worry about it some other time with a different support person I guess.
October 19, 200618 yr No, they are not the same thing. They do have SOME similarities however.The main similarity is that they both cache php opcode so it doesn't have to be parsed at runtime.The main DIFFERENCE, and this is where IPB's new support comes into play, is that with eaccelerator you can actually access the memory directly - storing data into memory, and retrieving data from memory (instead of the database). Zend optimizer offers no such support.It's sound good. And please add Xcache(http://trac.lighttpd.net/xcache/wiki) support.Have you read the feature list of that software? :)Xcache does not appear to have any API's to let you access memory directly, as turck-mmcache, memcache, and eaccelerator do. In other words, you can install Xcache, and IPB does not have to do anything to support it - but it also cannot make use of any additional functionality. With the others that we added support for, there are additional API's to help alleviate resources, and is why IPB supports those (and not XYZ cache engine). If you find any other cache engines that DO have api's to let you directly store and retrieve from memory please let me know.
October 19, 200618 yr Xcache does not appear to have any API's to let you access memory directly, as turck-mmcache, memcache, and eaccelerator do. In other words, you can install Xcache, and IPB does not have to do anything to support it - but it also cannot make use of any additional functionality. With the others that we added support for, there are additional API's to help alleviate resources, and is why IPB supports those (and not XYZ cache engine). If you find any other cache engines that DO have api's to let you directly store and retrieve from memory please let me know.It have :)http://trac.lighttpd.net/xcache/wiki/XcacheApi/:blink:"> <IMG style= :wub:"><IMG style=:wub:">
Archived
This topic is now archived and is closed to further replies.