PEAK XOOPS - Re: FastestCacheHack -> ignore caching for admins in englishin japanese

Re: FastestCacheHack -> ignore caching for admins

Target News
Subject FastestCacheHack experimental version
Summary "The Fastest Cache Hack" has just been released as an experimental version.http://www.peak.ne.jp/xoops/md/mydownloads/singlefile.php?lid=67&cid=2This is the 1st system of "Page Caching" for XOOPS.The main idea is based on "hacking redirect_header()" fo...

List posts in the topic

none Re: FastestCacheHack -> ignore caching for admins

msg# 1
depth:
0
Previous post - Next post | Parent - Children.1 .2 .3 | Posted on 2007/5/9 21:19 | Last modified
jayjay  Private 1st Class   Posts: 11
Hi Gijoe!

I've implemented your Fastest Cache Hack and it works perfectly! Very satisfied with your work

I'm wondering if one could exclude certain user groups from caching. Let's say the webmaster logs in and he belongs to "'XOOPS_GROUP_ADMIN', '1'". He would like to see the website without caching, so that he can quickly check his changes and correct them if he made a mistake.

The other users will still see the standard "'FASTESTCACHE_EXPIRE_USER' , 300" and guests will still see the "'FASTESTCACHE_EXPIRE_GUEST' , 3600" cache.

Is that possible? How would I go about implementing this?

Edit:
Tried adding this on line 45:
else if( ! empty( $_POST ) || $xoopsUserIsAdmin == true || @$xoopsOption['pagetype'] == 'user' || preg_match( '?(/system/|/admin/|register\.php)?' , $_SERVER['REQUEST_URI'] ) ) {
	define( 'NOCACHE' , 1 ) ;
}

Didn't work, but maybe coming close?
Votes:1 Average:10.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!