Bravo List
Register
Go Back   > Bravo List > Torrents Trackers > Free Torrent Source
Reply
  #1  
Old 26-12-09, 19:54
benjaminbih's Avatar
benjaminbih benjaminbih is offline
Hobby Coder
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Lightbulb [FIX] Make cache settings usable
Maybe someone of the FTS source users have noticed that cache is not really used. On every page call (index.php) the cache system caches content, instead of caching content after expired time period.

On youre page you see somthing like:
This content has been last updated 2009-12-26 18:30:21. Cached every 0:00:00
Which means there are no seconds for recaching setted.

The reason is as followed:
Example in factory.php the function stats(),
look at 'global'
PHP Code:
    public function stats() {
        
collapses('statsindex','<b>Tracker Statistics</b>');
     global 
$_c$maxusers
$_c = This var only calls a new instance of the cache function
$maxusers = This var only calls the string from maxusers settings

To make the cache system work right, you have to add a further var named $c. The var $c return the strings that in your database table named 'options' are saved .

The right use in a function for expample function stats() is:

PHP Code:
    public function stats() {
        
collapses('statsindex','<b>Tracker Statistics</b>');
     global 
$_c$c$maxusers
Now you can see this:
This content has been last updated 2009-12-26 18:55:06. Cached every 0:10:00
Reply With Quote
The Following 2 Users Say Thank You to benjaminbih For This Useful Post:
Phogo (29-12-09), yoligim (03-01-10)
  #2  
Old 09-01-10, 17:45
Phogo's Avatar
Phogo Phogo is offline
Super MOD
 
Join Date: Jan 2008
United Kingdom
Posts: 869
Default
Where do you add the other var?
Reply With Quote
  #3  
Old 09-01-10, 22:34
benjaminbih's Avatar
benjaminbih benjaminbih is offline
Hobby Coder
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Default
Quote:
Originally Posted by phogo View Post
Where do you add the other var?
What for other var?
This is an example, you have to search the functions that contains call of cache function and then add the global variable to it
Reply With Quote
  #4  
Old 09-01-10, 22:38
Phogo's Avatar
Phogo Phogo is offline
Super MOD
 
Join Date: Jan 2008
United Kingdom
Posts: 869
Default
MY mistake! Fixed thanks
Reply With Quote
Reply

Tags
cache , fix , make , settings , usable

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FIX] FTS 1.1 not usable buttons on topic display in IE and JS error benjaminbih Free Torrent Source 2 30-01-10 01:16
Cache lite bsf Community Cafe 4 28-01-10 20:17
How Usable is This? Mass Zero YSE 0 06-07-09 14:18
IE Cache fix joeroberts phpMyBitTorrent (BT.Manager) 0 03-02-09 15:17
Need YSE PRE6 cache mod kp380lv YSE 1 25-12-08 20:38



All times are GMT +2. The time now is 10:32. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2017, vBulletin Solutions Inc.