Pages: [1]
Author Topic: Problem with cache  (Read 355 times)
Customers
Newbie
*

Karma: 0
Posts: 5


Email
on: May 19, 10, 02:08 PM

Hi,

I use the theme trendy and I have problem with cache.
On the top of the front  page I have the featured games that should be automatically alternating, because of the cache it does not happen. The same applies to the comments on the front page. New comments will not appear because of the cache. Is there a possiblity to switch off the cache for an individual block?

thanks
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #1 on: May 21, 10, 02:51 AM

you can decrease the cache's TTL time to 1-2 minutes. This will still keep the server load on a safe level and new coments will be visible in a minute after posting. Just curious, how many visitors  are on you site per day - thousands, tens of thousands or handreds of thousands?
Logged
Customers
Full Member
*

Karma: 0
Posts: 32


Reply #2 on: May 28, 10, 08:08 AM

Hi sergey,

I've no files in my cache folder, so i've enabled it.
I've juste changed class.Cache.php line 63 (for SEO reason)

   $path = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['cSite']['sSiteRoot'] . 'cache';

to
   $path = $_SERVER['DOCUMENT_ROOT'] . $GLOBALS['cSite']['/'] . 'cache';

Cld u help me plz.
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #3 on: May 30, 10, 07:53 AM

script can't recognize the $GLOBALS['cSite']['/'] because in the place of '/' must be a variable name. If you want to move your cache to a specific folder, just write
Code:
$path = 'the folder name'
. Please note, folder name must contain the full path from your server's root folder.
Logged
Customers
Full Member
*

Karma: 0
Posts: 32


Reply #4 on: May 31, 10, 12:10 PM

Thanks,

i do that : $path = $_SERVER['cSite'] . 'cache';
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #5 on: May 31, 10, 01:27 PM

and does that work?
Logged
Customers
Full Member
*

Karma: 0
Posts: 32


Reply #6 on: Jun 01, 10, 11:37 AM

Yes, its ok  Grin
Logged
Administrator
Sr. Member
*

Karma: 7
Posts: 486


Email
Reply #7 on: Jun 01, 10, 12:32 PM

have to say I'm surprised because have no idea what $_SERVER['cSite'] means Smiley
Most likely it's always an empty string (see docs about $_SERVER constants at http://php.net/manual/en/reserved.variables.server.php) and therefore $path = 'cache' in your case...

Nevertheless, if it's working, I'd suggest to not touch anything Wink
Logged
Pages: [1]
 
Jump to: