PEAK XOOPS - Fastest Cache Hack (Experimental version) in englishin japanese






Main : XOOPS Hacks : 

Category: XOOPS Hacks ore     x22       php5
Download Now! Download Now! Fastest Cache Hack (Experimental version) Popular Version: 0.26
Submitted Date:  2006/6/30
Description:
in englishin japanese== THE FASTEST CACHE HACK for XOOPS ==

SUMMARY:

A hack for Page Caching of XOOPS.

This hack is not for novices but for experts.



USAGE:

(1) copy fastestcache.php into your XOOPS_ROOT_PATH/include/

(2) make a new folder out of DocumentRoot eg) /home/yourhome/xoops/

(3) make a new folder named "fullcache" under the folder made in step2. Then, chmod 777 fullcache/ .

(4) insert a line into just after defining XOOPS_URL in mainfile.php. (Edit '/home/yourhome/xoops')

	define('XOOPS_TRUST_PATH','/home/yourhome/xoops');


(5) insert a line into just before including common.php (out of if part) in mainfile.php.

	require XOOPS_ROOT_PATH.'/include/fastestcache.php' ;

If you use EMLH, this line should be inserted after EMLH.
If you use Protector, this line should be inserted just before precheck.

(6) insert a line into just after including common.php (inside if part) in mainfile.php

	if (!isset($xoopsOption['nocommon']) ... ) {
		include XOOPS_ROOT_PATH."/include/common.php";
		fastestcache_setcookie() ; // Insert this
	}


(7) open include/functions.php and insert a line into the top of function redirect_header().

function redirect_header($url, $time = 3, $message = '', $addredirect = true)
{
    fastestcache_clearcache() ; // Insert this

    global $xoopsConfig, $xoopsRequestUri, $xoopsLogger, $xoopsUserIsAdmin;


If you've updated XOOPS core version, patch include/functions.php again.



CHANGELOG

2006-06-30 0.26
- fixed the judgement whether content is html or not (thx suin)

2006-06-27 0.25
- modified for environment with empty $_SERVER['REQUEST_URI']

2006-02-23 0.24
- fixed register.php can't be cacheable

2006-02-19 0.23
- fixed a bug on login'in and login'out. (thx biroron)
- disabled any caches for admin areas

2006-02-13 0.22
- added a configuration of a regex pattern for excluding some URIs.

2006-01-29 0.21
- fixed a bug about user cannot register (thx harasaki)

2006-01-03 0.20
- added two configurations (cache lifetime is separated by 2 - users&guests)
- removing session_id() in the contents before storing it
- fixed a bug with the login reflection

2005-12-30 0.11
- added the English document
- removed some debugging codes

2005-12-29 0.10
- The 1st experimental version


by GIJOE http://www.peak.ne.jp/xoops/


Downloaded 18562 times  18562  File Size 5.26 KB  Supported Platforms tar.gz|zip|ore|php5|x22  Home Page http://www.peak.ne.jp/
Modify | Report Broken File | Tell a Friend | Comments (10)


Comments list

fayssal  Posted on 2007/4/27 19:29
thx Gijoe
GIJOE  Posted on 2007/4/27 5:46
Perhaps, it works well even with 2.0.16, though I've never tested it.
fayssal  Posted on 2007/4/27 4:19
hi,is it compatible with xoops2.0.16?
mendow  Posted on 2006/12/12 17:53
Quote:

GIJOE wrotes:
Check it by yourself

I can accept it as the answer "Yes, it is correct" because it works.
GIJOE  Posted on 2006/12/7 5:20
Check it by yourself
mendow  Posted on 2006/12/6 0:59
if I want forbidden FCH for singles documents
have writte correctly...?

I have written so.

define( 'FASTESTCACHE_EXCLUSION_REGEX' , '?(modules/contact|viewpmsg\.php|modules/myalbum/submit_\.php)?' ) ;


It is correct?
tl  Posted on 2006/9/4 5:31 | Last modified
I have a weblink module which consumes MySQL queries like crazy (160!)
I tried to hack fastcache.php, will the following work?

top of the file
global $xoopsModule ;
if( isset( $xoopsModule ) && is_object( $xoopsModule ) ) {
$dirname = $xoopsModule->getVar( 'dirname' ) ;
}

if ($dirname == weblinks ) {
define( 'FASTESTCACHE_EXPIRE_GUEST' , 3600 ) ;
} else {
define( 'FASTESTCACHE_EXPIRE_GUEST' , 300 ) ;
} 

thanks!
tl  Posted on 2006/9/3 1:56 | Last modified
GIJOE:
Do you have any plan turning it into a little module with controllable cache time for each individual module? Per page per module caching would be great!
tl
irmtfan  Posted on 2006/9/2 18:48
i think its a problem in multilanguage hack ( any multi language hack i think) because Google index pages with url but there is same url for 2 languages ( English and Persian)
so google recognize this in persian and ads are not correct: http://www.jadoogaran.org/modules/news
but this is correct: http://www.jadoogaran.org/modules/news/?easiestml_lang=en

now i want to found a way to force google to index site in english. i post a new topic about it in forum
GIJOE  Posted on 2006/8/30 4:45
In developping environment, FCH must be disabled.
In running environment, you should set theme/templates manually.
eg) clean php files under templates_c/

I don't know google adsense well.
Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!