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

Re: FastestCacheHack -> ignore caching for admins

Target News
Subject 最速キャッシュハックの実験版放流
Summary 「最速キャッシュハック」を実験版として公開します。http://www.peak.ne.jp/xoops/md/mydownloads/singlefile.php?lid=67&cid=2XOOPS初(?)のページキャッシュシステムで、XOOPSの動作原理に基づいたキャッシュ制御にその特徴があります。もっとも特徴的なのは、redirect_...

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  一等兵   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!